-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReportCard.java
64 lines (51 loc) · 1.57 KB
/
ReportCard.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package com.example.android.reportcard;
/**
* Created by Muhammad Azeem on 25/06/2016.
*/
public class ReportCard {
final public String STUDYLEVEL = "Grade 12-Science";
private int mathGrade;
private int physicsGrade;
private int chemistryGrade;
private int biologyGrade;
public int getMathGrade() {
return mathGrade;
}
public void setMathGrade(int mathGrade) {
this.mathGrade = mathGrade;
}
public int getPhysicsGrade() {
return physicsGrade;
}
public void setPhysicsGrade(int physicsGrade) {
this.physicsGrade = physicsGrade;
}
public int getChemistryGrade() {
return chemistryGrade;
}
public void setChemistryGrade(int chemistryGrade) {
this.chemistryGrade = chemistryGrade;
}
public int getBiologyGrade() {
return biologyGrade;
}
public void setBiologyGrade(int biologyGrade) {
this.biologyGrade = biologyGrade;
}
public ReportCard(int mathGrade, int physicsGrade, int chemistryGrade, int biologyGrade) {
this.mathGrade = mathGrade;
this.physicsGrade = physicsGrade;
this.chemistryGrade = chemistryGrade;
this.biologyGrade = biologyGrade;
}
@Override
public String toString() {
String result=STUDYLEVEL + "\n" +
"Math = " + mathGrade + "\n" +
"Physics = " + physicsGrade + "\n" +
"Chemistry = " + chemistryGrade + "\n" +
"Biology = " + biologyGrade + "\n" +
"--END--";
return result;
}
}