OBJECT ORIENTED PROBLEM SOLVING SKILLS
[
Log In
]
Home
OOP
Classes and Objects
Question 1
Question 2
Question 3
Constructors
Question 1
Question 2
Question 3
Question 4
Inheritance
Question1
Question2
Question3
Question4
Polymorphism
Question1
Help
Inheritance
Design a Superclass
Teacher
having two attributes
(TeacherId, TeacherName)
and three methods(
getTeacherId( ), getTeacherName( ), display()
) then design another subclass
Department
that is extended from Superclass
Teachers
and having two methods
(getDepartment( ) and toString()) and one attribute DepartmentName
. Use the following class daigram .
Class Daigram
Super Class Teacher
Attributes
public int TeacherId
public String TeacherName
Methods
public void getTeacherId( )
public void getTeacherName( )
public void display( )
Sub class Department
Attributes
public String DepartmentName
Methods
public void getDepartment( )
public void toString( )
Random Steps
Actions
Proposed Steps
Psedu Code
Create Sub Class
Super Class Attributes
Create Super Class
getTeacherName( )
End Sub Class
Sub Class Attributes
End Super Class
toString( )
getDepartment( )
display( )
getTeacherId( )
No of Errors:
Select any step from the first List Box and move it to the second List Box and make all its lines into correct steps of sequential order, using the Arrow Keys
.