Commit 5ff13b14 authored by 9831067's avatar 9831067

Delete Student.java

parent 384608fd
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;
/**
* Set a name of student.
* @param sName student
*/
public void setName(String str) {
firstName = str;
}
/**
* Set a lastName of student.
* @param sLastName student
*/
public void setLastName(String str) {
lastName = str;
}
/**
* Set a id of student.
* @param sId student
*/
public void setId(String str) {
id = str;
}
public void print() {
System.out.println("first name is: "+ firstName + " last name is: "+lastName + "id is : "+ id + "grade is: " + grade);
}
/**
* Set a grade of student.
* @param sGrade student
*/
public void setGrade(int s) {
grade = s ;
}
/**
* get the first name of student
* @return firstName field
*/
public String getLastName() {
return lastName;
}
/**
* get the last name of student
* @return lastName field
*/
public String getfirstName() {
return firstName;
}
/**
* 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 ;
}
/**
* 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;
}
}
\ No newline at end of file
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