-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path14-classes.js
More file actions
38 lines (37 loc) · 1015 Bytes
/
14-classes.js
File metadata and controls
38 lines (37 loc) · 1015 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
class trainee_org{
constructor(name){
this.name=name;
}
}
class degree extends trainee_org{
constructor(name,degree){
super(name);
this.degree=degree;
}
}
class performance extends degree{
constructor(name,degree,grade){
super(name,degree);
this.grade=grade;
}
}
class taskdone_onTime extends performance{
constructor(name,degree,grade,yesORno){
super(name,degree,grade);
this.yesORno=yesORno;
}
report(){
console.log(" trainee name :"+ this.name);
console.log(" trainee degree :"+ this.degree);
console.log(" trainee performance :"+ this.grade);
console.log(" trainee task completion on time :"+ this.yesORno);
}
}
const stu1=new taskdone_onTime("sunny negi","bca","a+","yes");
const stu2=new taskdone_onTime("gagan","b.tech","b+","yes");
const stu3=new taskdone_onTime("abhinav","bca","c+","no");
stu1.report();
console.log("\n");
stu2.report();
console.log("\n");
stu3.report();