/** * The Student class represents a student in a student administration system. * It holds the student details relevant in our context. * * @author Ali * @version 0.0 */ public class Student { // the student’s first name private String firstName; // the student’s last name private String lastName; // the student ID private String id; //the grade private int grade; /** * Create a new student with a given name and ID number. * * @param fName first name of student * @param lname last name of student * @param sID student ID */ public Student(String fName, String lname, String sID){ firstName = fName; lastName = lname; id = sID; grade = 0; } /** * @param fName Set a firstName of student. */ public void setFirstName(String fName) { firstName = fName; } /** * @param lName Set a lastName of student. */ public void setLastName(String lName) { lastName = lName; } /** * @param sID Set a id of student. */ public void setId(String sID) { id = sID; } /** * Print the student’s first name and last name and ID number and grade to the output terminal. */ public void print() { System.out.println("first name is: "+ firstName + " last name is: "+lastName + " id is : "+ id + " grade is: " + grade); } /** * * @param grade Set the grade of student. * */ public void setGrade(int grade) { this.grade = grade ; } /** * get the first name of student * @return firstName field */ public String getFirstName() { return firstName; } /** * get the last name of student * @return lastName field */ public String getLastName() { return lastName; } /** * get the ID of student * @return ID field */ public String getId() { return id; } /** * get the grade of student * @return grade field */ public int getGrade () { return grade ; } }