Newer
Older
labs / tiddlers / content / review / java_exercises / _Review_Menu.md
@Mark George Mark George on 15 Jul 2021 725 bytes Add review exercises

Extend the system so that a user can create, add contacts, and view the list:

The following should be added to the application class that you created in section 5.2.

  1. Write a text-based menu that gives the user the options to 'Create', 'Add', and 'View' the list.

  2. Add three public static void methods that will be called in response to the user's menu input.

  3. The 'Create' method should create a new instance of the contact list.

  4. The 'Add' method should prompt the user for the data for a single contact, and use this data to construct an instance of the contact class, and add it to the list.

  5. The 'View' method should call the method that displays the contact list.