-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudent.java
More file actions
31 lines (30 loc) · 752 Bytes
/
Student.java
File metadata and controls
31 lines (30 loc) · 752 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
import java.util.*;
public class Student implements Login extends User,Exam{
int marks;
public void runner() throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
subMenu();
int choice = br.read();
while(choice != 3){
switch(choice){
case 1: getExam();break;
case 2: viewMarks();break;
default: System.out.println("Invalid Choice");break;
}
choice = br.read();
}
if(choice == 3){
System.out.println("Returning");
}
}
public getExam(){
takeExam();
}
public viewMarks(){
marks = calMarks();
System.out.println("Total marks is" + marks + "!");
}
}
public void subMenu(){
System.out.println("1)Take Exam\n2)View mark3)Exit\nYour choice:");
}