-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudent.java
More file actions
29 lines (24 loc) · 942 Bytes
/
Student.java
File metadata and controls
29 lines (24 loc) · 942 Bytes
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
/**
* Student
*/
public class Student {
String id;
float numberCreditHours;
short numberPointsEarned;
float gradePointAvg;
Student()
{
id="9999";
numberPointsEarned=12;
numberCreditHours=3;
System.out.print("\nID set to 9999\nPoints Earned are set to 12\nNumber of Credit hours is to 3");
}
public void setId(String Id) {this.id=Id;}
public void setNumberCreditHours(float creditHours) {numberCreditHours=creditHours;}
public void setPointsEarned(short earnedPoints) {numberPointsEarned=earnedPoints;}
public void computeGradeAVG(){ gradePointAvg=numberPointsEarned/numberCreditHours;}
public String getId() {return id;}
public float getNumberCreditHours(){return numberCreditHours;}
public float getNumberPointsEarned(){return numberPointsEarned;}
public float getGradePointAvg(){return gradePointAvg;}
}