-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
31 lines (28 loc) · 1.23 KB
/
Main.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
package school_management;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args){
teacher chris = new teacher(1,"chris",500);
teacher moris = new teacher(2,"moris",800);
student adi = new student(1,"adi",3);
student ikra = new student(2,"ikra",4);
List<teacher> teacherList = new ArrayList<>();
List<student> studentList = new ArrayList<>();
teacherList.add(chris);
teacherList.add(moris);
studentList.add(adi);
studentList.add(ikra);
mangementSystem ms = new mangementSystem(teacherList,studentList);
adi.payfees(5000);
ikra.payfees(3000);
// System.out.println(" school has earned $" +" "+ ms.getTotalMoneyearned());
/**
* salries
*/
chris.receivesalary(chris.getSalary());
System.out.println(" school has spent on $" +" "+ chris.getSalary() +" "+"and now they are left with "+ ms.getTotalMoneyearned());
moris.receivesalary(moris.getSalary());
System.out.println(" school has spent on $" +" "+ moris.getSalary() +" "+"and now they are left with "+ ms.getTotalMoneyearned());
}
}