Question: 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
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
Get step-by-step solutions from verified subject matter experts
