Dart 2 Flashcards

some concepts of POO in dart programming language (12 cards)

1
Q

What are state and behavior in Dart?

A

The variable represents the state of the class I mean the value the object have in specified time, and the function represents the behavior of the class I mean the actions the object can do to manipulate the state

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

What they call the variables inside the class?

A

properties

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

What they call functions declared inside the class?

A

methouds

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

featurs of POO?

A
  1. object
  2. class
  3. inheritance
  4. encapsulation
  5. polymorphism
  6. abstraction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What the operater tell is you if the object iherite from another class ?

A

the operater ‘is’

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

how to make the variables privet ?

A

you put “_” before the variable

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

How to use the privat variables ?

A

import the class
or
getters and setters

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

How to declare a getter ?

A

String get name() => _name;
You dont need to call the function you just put the object.name

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

Why do we put {} in the constructor?

A

to make the parameters unnecessary to put in the order in which they were declared

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

What is a static variable?

A

they are shared with all the instanse of the class

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

What is a static method?

A

they can be called with only the name of the class you don’t need to create an object

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

What is Mixin?

A

Mixing includes some classes in one class, which helps us to achieve multiple inheritance

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