-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDesignPrincipleExercise.java
More file actions
46 lines (44 loc) · 1.37 KB
/
DesignPrincipleExercise.java
File metadata and controls
46 lines (44 loc) · 1.37 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
class Student{
int studentId;
String name; // this is student name
String date; // this date of joining of student in school
String cityName;
String districtName;
String localityName;
String pinCode;
String phoneNumber; // this is student's parent number
String phoneNumber2; // this is student's number
int numberOfDaysLate;
int numberOfDaysAbsent;
int grade; // this is student grade in which he/she is currently studying
public int findStudentFees(int grade){
if(grade>=9)
return 2000;
else
return 2800;
}
//We are calculating the late fees by finding the fees of student
//then multiply with number of days student came late to school
// and final amount's 10% is taken as fine
public int findLateComingDues (int numberOfDaysLate, int grade){
int fees = 0;
if(grade>=9)
fees = 2000;
else
fees = 2800;
int lateComingDues = fees * 0.1 * numberOfDaysLate;
return lateComingDues;
}
public boolean checkStudentMarks(int studentId){
//code
return true;
}
public boolean checkTeacherAttendance(String teacherName, int teacherId) {
//some code logic
return true;
}
public int findElectricityBill(int schoolElectricMeterId){
//code
return 0;
}
}