-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathles19.dart
50 lines (47 loc) · 1.44 KB
/
les19.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//--> OOP - Class | inheritence
void main () {
MasterStudent s=MasterStudent('ADEL');
print (s.name);
}
class Human{
//Human.named(){
//print('Human constructor ');
//}
Human(this.name){
print('Human Constructor $name');
}
String? name;
void eat(){}
}
class Student extends Human{
Student.(String? name) : super (name){
print('Student Constructor {name}');
}
String? studyAt;
}
class MasterStudent extends Student{
MasterStudent(String? name) : super(name){
print('MasterStudent Constructor');
}
String? workAt;
}
//--------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------
//class Human { //--> Human
//String? name; //--> every human .. sure with Name and ...
//void eat();{ //--> every human need to Eat to live .. and so on ...
//}
//class Student extends Human { //.. add extend to active inheritance
//String? studyAt; //--> . . . .human need to learn also ..
//}
//class MasterStudent { //-->howver, by normal most post-bachelor humans continue to Master,
// .. , and working some where.. ..etc.
//String? workAt;
//String? facultDept;
//String? univrName;
//String? cellPhone;
//String? homeTown;
//String? emailAddres1; //--> do you get That meaning .... !!
//String? emailAddres2;
//}
//}