The design requirements of the following writing Java source code:
The name of the class: Teacheer
Member variables (all are: private)
The name (String)//name
TeacherID (String)//job number
Methods:
(1) constructor (no parameters and set the name to "li mou some", at age 20)
SetNmae (a String type parameters, called the name will be the name of a value for the new value)
GetName (no parameters and return name)
SetTeacherID (have an int type parameter, called dar will teacheerID a value for the new value)
GetTeacherID (no parameters and return to work number)
CodePudding user response:
Can trouble you go snacks, this problem? Will you send a post QiuZhuRen this?Can't build a entity class, small white think will get,
public class Teacheer {
private String name;
Private String teacherID;
Public Teacheer () {
This. Name="li mou some";
Enclosing teacherID="20";
}
Public String getName () {
return name;
}
Public void elegantly-named setName (String name) {
this.name=name;
}
Public String getTeacherID () {
Return teacherID;
}
Public void setTeacherID (String teacherID) {
Enclosing teacherID=teacherID;
}
}