-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinh.dart
81 lines (41 loc) · 921 Bytes
/
inh.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// class Person{
// String name;
// int age;
// Person(this.name, this.age);
// String personData() {
// return '$name, $age';
// }
// }
// class Emp extends Person{
// double salary;
// Emp(name, age, this.salary) : super(name, age);
// }
// class Job{
// String name;
// double salary;
// Job(this.name, this.salary);
// }
// main() {
// Emp emp = Emp('ahmed', 20, 200.5);
// print(emp.personData());
// }
class Person extends X with Man, Woman{
String personName;
int age;
Person(this.personName, this.age);
}
class X{}
mixin Man on X{
String hoppy = 'hope';
String manName = 'as';
}
mixin Woman on X{
String fashion = 'fashion';
}
main() {
Person person = Person('name', 20);
print(person.personName);
}
// System for Emp ( HR, Sales, Emp)
// calculate salary for each department ( ex: sales salary depend on comision)
// add new emp