forked from TonyOjelel/Refactory-JavaScript-OOP-Classes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SarahNdianekwu.js
133 lines (107 loc) · 2.97 KB
/
SarahNdianekwu.js
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// /Assignment: Create 10 classe with atleast 5 properties and give at least 5 objects for each class.
//name the file with your name
class Friend{
constructor(name, age, height, color, country){
this.name = name;
this.age = age ;
this.height =height;
this.color = color;
this.country = country
}
}
let friends = new Friend('john', '20', '6.7ft', 'Black', 'uganda')
let friend1 = new Friend('Sandra', '21', '5.7ft', 'white', 'new york')
let friend2 = new Friend('Peter', '26', '5.9t', 'Black', 'Nigeria')
let friend3 = new Friend('Paul', '28', '5.3ft', 'Black', 'Nigeria')
let friend4 = new Friend('Ben', '18', '5.3ft', 'Black', 'Uganda')
class Phone {
constructor(brand, model){
this.brand = brand;
this.model = model;
}
}
let phone1 = new Phone('nokie', '3010');
let phone2 = new Phone('Tecno', 's1')
let phone3 = new Phone('Tecno', 'hot1')
let phone4 = new Phone('Tecno', 'hot7')
let phone5 = new Phone('Tecno', 'hot10')
class Brand{
constructor(name){
this.name = name
}
}
let names = new Brand("Gucci")
let name1 = new Brand("Louis")
let name2 = new Brand("Armani")
let name3 = new Brand("Nike")
let name4 = new Brand("Jordan")
class Shoe{
constructor(name){
this.name = name
}
}
let namer = new Brand("Gucci")
let name11 = new Brand("Louis")
let name12 = new Brand("Armani")
let name13 = new Brand("Nike")
let name14 = new Brand("Jordan")
class Club{
constructor(name){
this.name = name
}
}
let club = new Brand("Groovy")
let club1 = new Brand("Vegas")
let club2 = new Brand("X-mas")
let club3 = new Brand("Behappie")
let club4 = new Brand("Grand")
class Football{
constructor(name){
this.name = name
}
}
let football = new Football("man-u")
let football1 = new Football("Arsenal")
let football2 = new Football("Man-city")
let football3 = new Football("Liverpool")
let football4 = new Football("realmadrid")
class Animal{
constructor(name){
this.name = name
}
}
let animal = new Animal('Dog')
let animal1 = new Animal('Goat')
let animal2 = new Animal('Cow')
let animal3 = new Animal('Pig')
let animal4 = new Animal('Camel')
class Bag{
constructor(name){
this.name = name
}
}
let bag = new Brand("Gucci")
let bag1 = new Brand("Louis")
let bag2 = new Brand("Armani")
let bag3 = new Brand("Nike")
let bag4 = new Brand("Jordan")
class Fruit{
constructor(name){
this.name = name
}
}
let fruit = new Fruit("Orange")
let fruit1 = new Fruit("Mango")
let fruit2 = new Fruit("Pawpaw")
let fruit3 = new Fruit("Grape")
let fruit4 = new Fruit("Waterlemon")
class Cream{
constructor(name){
this.name = name
}
}
let cream = new Cream("Purewhite")
let cream1 = new Cream("Glutawhite")
let cream2 = new Cream("Cocoa-butter")
let cream3 = new Cream("Sweetmother")
let cream4 = new Cream("Nivea")