Initial commit

This commit is contained in:
xixu-me committed 2024-03-17 22:31:48 +08:00
commit 054b77ccdd
27 files changed
+1362

No files matched your search

@@ -0,0 +1,21 @@
public class Student extends Person {
private String studentID;
public Student(String name, int age, String studentID) {
super(name, age);
this.studentID = studentID;
}
public void speak() {
System.out.println("I am a student, my name is " + getName() + ", and I am " + getAge()
+ " years old. My student ID is " + studentID + ".");
}
public String getStudentID() {
return studentID;
}
public void setStudentID(String studentID) {
this.studentID = studentID;
}
}