-
Notifications
You must be signed in to change notification settings - Fork 0
/
Res.java
49 lines (42 loc) · 847 Bytes
/
Res.java
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
import java.util.*;
interface exam
{
public int Per_cal();
}
class st
{
int rn,m1,m2;
String nm=new String();
void accept()
{
Scanner sc= new Scanner(System.in);
System.out.println("ENTER ROLL :");
rn=sc.nextInt();
System.out.println("ENTER NAME :");
nm=sc.next();
System.out.println("ENTER SUBJECT 1 MARK");
m1=sc.nextInt();
System.out.println("ENTER SUBJECT 2 MARK");
m2=sc.nextInt();
}
void display()
{
System.out.println("STUDENT ROLL :");
System.out.println("STUDENT NAME :");
}
}
class Res extends st implements exam
{
public int Per_cal()
{
return (m1+m2);
}
public static void main(String A[])
{
Res r=new Res();
r.accept();
r.display();
int t=r.Per_cal();
System.out.println(t);
}
}