update,
This commit is contained in:
17
_resources/it114105/itp3914/Lab11/Ex8/Student.java
Normal file
17
_resources/it114105/itp3914/Lab11/Ex8/Student.java
Normal file
@@ -0,0 +1,17 @@
|
||||
public class Student {
|
||||
public static int numberOfStudent=0; //line 1
|
||||
public String name; //line 2
|
||||
|
||||
public Student (String name) { //line 3
|
||||
numberOfStudent++ ; //line 4
|
||||
setName(name); //line 5
|
||||
}
|
||||
|
||||
public int getNumberOfStudent() { //line 6
|
||||
return numberOfStudent; //line 7
|
||||
}
|
||||
|
||||
public void setName(String name) { //line 8
|
||||
this.name = name; //line 9
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user