Commit e54c52ff authored by 9831017's avatar 9831017

Upload New File

parent 7f575665
Pipeline #2095 canceled with stages
public class Student {
private String firstName;
// the student’s last name
private String lastName;
// the student ID
private String id;
//the grade
private int grade;
public String getFirstName () {
return firstName;
}
/**
* @param firstName set first name of a student
*/
public void setFirstName (String fName){
firstName = fName;
}
/**
* Print the student's last name and ID number to the output terminal.
*/
public void print() {
System.out.println(lastName + ", student ID: "
+ id + ", grade: " + grade);
}
public void setGrade (int grade2){
grade=grade2;
}
public int getGrade(){
return grade;
}
public Student(String fName, String lname, String sID){
firstName = fName;
lastName = lname;
id = sID;
grade = 0;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment