Question: Given the following UML diagram, develop the class declaration and definitions that is represented by the diagram. Also create two objects from this class in
Given the following UML diagram, develop the class declaration and definitions that is
represented by the diagram. Also create two objects from this class in the main function,
the names of the objects are aPerson and bPerson. The object aPerson should be created
using the default constructor and bPerson should be created using the parameterized
constructor. Call the displayPerson method of both objects.
Person
name : string
age : int
Person
Personname : string, age : int
setNamename : string
setAgeage : int
getName : string
getAge : int
displayPerson : void
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
