Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //this is the superclass for the preschool student groups
- //class delcaration statement for the superclass
- public class PreSchoolStudent{
- //variable declaration statement
- protected String group;
- protected String teacher;
- protected String stuName;
- protected int stuAge;
- protected String list;
- //set method for setting the group
- public void setGroup(String g){
- group = g;
- }
- //get method for getting the group
- public String getGroup() {
- return group;
- }
- //set method for setting the teacher name
- public void setTeacher(String t){
- teacher = t;
- }
- //get method for getting the teacher name
- public String getTeacher() {
- return teacher;
- }
- //set method for setting a student's name
- public void setStudent(String n){
- stuName = n;
- }
- //get method for obtaining the student's name
- public String getStudent() {
- return stuName;
- }
- //set method for setting the student's age
- public void setAge(int a){
- stuAge = a;
- }
- //get method for obtaining the student's age
- public int getAge (){
- return stuAge;
- }
- //set method for setting the materials' list for a group
- public void setList(String l){
- list = l;
- }
- //get method for obtaining materials' list needed by a group
- public String getList(){
- return list;
- }
- public void setGroup(String g, String t, String n, int a, String l){
- group = g;
- teacher = t;
- stuName = n;
- stuAge = a;
- list = l;
- }
- }//end of class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement