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
Persons
having two attributes
(Name, Gender)
and three methods(
getName( ), getGender( ), toString()
) then design another subclass
Students
that is extended from Superclass
Persons
and having two methods
(getStudentId( ) and toString()) and one attribute StudentId
. Use the following class daigram .
Class Daigram
Super Class Persons
Attributes
public String Name
public String Gender
Methods
public void getName( )
public void getGender( )
public void toString( )
Sub class Students
Attributes
public int StudentId
Methods
public void getStudentId( )
public void toString( )
Random Steps
Actions
Proposed Steps
Psedu Code
Super Class Attributes
Sub Class Attributes
Create Sub Class
getName( )
getGender( )
End Sub Class
End Super Class
toString( )-SuperClass
toString( )-SubClass
Create Super Class
getStudentId( )
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
.