-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobjects.dart
More file actions
53 lines (34 loc) · 792 Bytes
/
Copy pathobjects.dart
File metadata and controls
53 lines (34 loc) · 792 Bytes
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
class Car{
int price = 0;
String model = 'Toyota';
String color = 'Blue';
void drive(){
print('The $color car of model $model and price $price is driving');
}
void stop(){
print('The car has stopped.');
}
}
class ComputerScienceStudents{
static String department = 'CSC';
String name = 'Jane';
String manNum = '';
void Introduction(){
print('hello $name');
}
void setName(name){
this.name = name;
}
}
void main(){
ComputerScienceStudents student1 = ComputerScienceStudents();
student1.Introduction();
student1.setName('Jude');
print(student1.name);
// Car cashBrand = Car();
// cashBrand.color = 'Yellow';
// cashBrand.price = 2000;
// print(cashBrand.color);
// cashBrand.drive();
// cashBrand.stop();
}