Advertisement
Swampert420

Teacher

Aug 14th, 2022 (edited)
664
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | Source Code | 0 0
  1. package pack1;
  2.  
  3. public abstract class Teacher {
  4.     protected int teacherId;
  5.     public int subjectId;
  6.    
  7.     public Teacher(int teacherId, int subjectId){
  8.         this.teacherId = teacherId;
  9.         this.subjectId = subjectId;
  10.     }
  11.    
  12.     protected abstract void setTeacherId(int teacherId);
  13.     protected abstract int getTeacherId();
  14.     public abstract void setSubjectId(int subjectId);
  15.     public abstract int getSubjectId();
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement