-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCourse.java
46 lines (41 loc) · 1.23 KB
/
Course.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
import java.util.*;
class Course {
String details;
String handout;
ArrayList<Student> enrolledStudents;
String createTest;
HashMap<String,Integer> marks;
Course(String details , String handout , ArrayList<Student> students , String test){
this.details = details;
this.handout = handout;
this.enrolledStudents = students;
this.createTest = test;
}
public void getDetails(){
System.out.println(this.details);
System.out.println("\n\n");
}
public void getHandout(){
System.out.println(this.handout);
System.out.println("\n\n");
}
public void getStDetails(){
for(Student st : enrolledStudents){
System.out.println(st.getName());
}
System.out.println("\n\n");
}
public void createNewTest(){
System.out.println("Test created");
System.out.println("\n\n");
}
public void getMarks(String name){
System.out.print("Your marks : ");
System.out.println(marks.get(name));
System.out.println("\n\n");
}
public void giveTest(){
System.out.println("Giving test");
System.out.println("\n\n");
}
}