Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA (I) Exercise Homework To create PhoneBook class, Person will be used as a type. UML Class Diagram is given as the following: count field
JAVA (I)
Exercise Homework To create PhoneBook class, Person will be used as a type. UML Class Diagram is given as the following: count field of PhoneBook should state the number of Person in PhoneBook. Default constructor should take 10 records (which means 10 People). The other constructor with count parameter should take the number of records from the Test class as a parameter. Then create a Person array to keep each record with using Person object. For displayPhoneBook() method, use a loop to display each record of Person one by one. PhoneBook -count: int arrPhoneBook: Person[] + PhoneBook( PhoneBook(count: int) + getCount(); int - setCount(count: int): void +displayPhoneBook(): void In Test class, create a Phone Book object that keeps 2 records. Send the information of first record with using related set methods. For the second record, use constructor with parameters. Sample Output: Jack Deal (0123456789) Frank Jones (@987654321) Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started