AppBrewery - Quizzler Flashcards

1
Q

setState call syntax

A
void setState( void Function fn)
setState( () { // ... } );
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Dart class syntax

A
class Name {
    // properties
    Name(){
        // constructor
    }

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

pillars of OOP

A

. Abstraction
. Polymorphism
. Inheritance
. Encapsulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

where to add classes

A

in lib folder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

abstraction

A

abstract away details of implementation; get to idea

Abstraction is the technique of hiding implementation. At it’s core there’s not much more to that answer. The bulk of meaning to abstraction come from how and why it is used.

It is used for the following scenarios

Reduce complexity. (Create a simple interface)
Allow for implementation to be modified without impacting its users.
Create a common interface to support polymorphism (treating all implementations of the abstracted layer the same.
Force users to extend the implementation rather than modify.
Support cross platform by changing the implementation per platform.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

encapsulation

A

separate jobs+roles of different objects/classes

It’s simply a containment of information.

Encapsulation means that a class publishes only what is needed for others to use it, and no more.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

enum syntax

A

enum Color { red, green, blue }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how to make a property private

A

prefix _

_prop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

inheritance syntax dart

A

Subclass extends ParentClass

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

inheritance concept

A

inherit common properties and functions from parent class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

polymorphism concept

A

changing shapes;
Poly = many
Morph = change or form
So polymorphism is the ability (in programming) to present the same interface for differing underlying forms (data types).

override common interface for custom subclass; e.g.

Shape super, .draw()
circle override .draw()
triangle override .draw()
many forms, one interface (draw)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

how to override in dart

A

@override

overriddenFunction () { //… }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

double

A

double data type in dart

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

class constructor syntax for same parameter and class prop name

A
class MyClass {
  int prop;
  MyClass (this.prop)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly