-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmangementSystem.java
More file actions
63 lines (51 loc) · 1.52 KB
/
mangementSystem.java
File metadata and controls
63 lines (51 loc) · 1.52 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package school_management;
import java.util.ArrayList;
import java.util.List;
/**
* School consist of many students
*/
public class mangementSystem {
private List<teacher >teachers ;
private List<student> students ;
private static int totalMoneyearned;
private static int totalMoneyspent;
//List<Float> numbers = new ArrayList<>();
public mangementSystem(List<school_management.teacher> teacher, List<school_management.student> student) {
this.teachers = teachers;
this.students = students;
totalMoneyearned = 0;
totalMoneyspent = 0;
}
public List<school_management.teacher> getTeacher() {
return teachers;
}
public List<school_management.student> getStudent() {
return students;
}
public int getTotalMoneyearned() {
return totalMoneyearned;
}
public int getTotalMoneyspent() {
return totalMoneyspent;
}
/**
* add teacher to the school
* @param teacher
*/
public void addTeacher(teacher teacher) {
teachers.add(teacher);
}
public void addStudent(student student) {
students.add(student);
}
public static void updateTotalMoneyearned(int Moneyearned) {
totalMoneyearned+= Moneyearned;
}
/**
* money spent by school on salaries of teacher.
* @param Moneyspent
*/
public static void updateTotalMoneyspent(int Moneyspent) {
totalMoneyearned-= Moneyspent;
}
}