-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresult.java
More file actions
39 lines (37 loc) · 762 Bytes
/
result.java
File metadata and controls
39 lines (37 loc) · 762 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
import school.student;
import school.sports;
class result extends student implements sports
{
double mst1, mst2, total;
void getmarks(double m1,double m2)
{
mst1 = m1;
mst2 = m2;
}
void putmarks()
{
System.out.println("Marks are: " +(mst1 + mst2));
}
public void putsports()
{
System.out.println("Sports name: "+spname);
System.out.println("Sports weitage: "+sport);
}
void display()
{
putdata();
putmarks();
putsports();
System.out.println("Total Score: "+ (total = mst1 + mst2 + sport));
}
}
class demo
{
public static void main(String[] args)
{
result r = new result();
r.getdata(1001,"Ram");
r. getmarks(85.0,90.0);
r.display();
}
}