The UML diagram for an Instantiable class Person is shown below:
Write an application program to create 5 person objects, with appropriate data, using a suitable array.
Using the information entered for the 5 objects, write methods to:
• count the number of females in the array
• count the number of people aged over 25
• find the average age of all males
• find the average age of all people
Comments
Leave a comment