For this assignment, you will need five classes: The application class with the main method A controller class A model class (for example, in Vintage Sounds, Instrument) A second model class...

For this assignment, you will need five classes:

  1. The application class with the main method

  2. A controller class

  3. A model class (for example, in Vintage Sounds, Instrument)

  4. A second model class containing an ArrayList of model class objects (e.g., InstrumentList)

  5. A view class (e.g., InstrumentUI)


When the application is launched:



  1. The main method creates an instance of the controller class.

  2. The controller class creates the list of model objects, both the ArrayList and its members.

  3. The controller class creates and shows an instance of the view class. The view class should include JTextFields to display data accessed from the model objects.

  4. When the view class is first shown, it should display data from the object in the first position of the ArrayList.

  5. The view class should include the following buttons:

    1. Previous - to move backwards

    2. Next - to move forwards through the objects in the ArrayList

    3. Add - add a new object to the list

    4. Update - make changes to an existing object

    5. Delete - remove the current object

    6. Quit - exit the application (hint: you can use System.exit(0); )



  6. All of the behavior above should be mediated by the controller class. In other words, the view class should only communicate with the controller, and the controller alone manages interactions with the model objects.


Part 2:


Consider where in your application you could present users with a list of data, allowing them to select a single item and view its details. For example, in the Vintage Sounds demo application we want the user to be able to view a list of instruments in inventory, and select an instrument to view its details.


In addition to the list-detail views, you will be implementing what is commonly referred to asCRUD: Create, Read, Update, Delete functionality.


For this assignment, you will need at least two new classes:



  1. A view to display the list of items (e.g., InstrumentListUI in Vintage Sounds).

  2. A view to display the details of a single item (e.g., InstrumentDetailUI in Vintage Sounds).


You may need other classes, for example, model classes and a controller, depending on what you have already implemented in your project.


When the application is run:



  1. It should provide all of the behavior as specified in the last unit’s assignment.

  2. It should allow the user to navigate to a view providing a list of one of your project’s model objects.

  3. It should allow the user to select an item from the list and display its details in a separate detail view class.

  4. It should allow the user to add new items to the list using the detail view as the input data form.

  5. It should allow the user to change the data for a particular item using the detail view as the input data form.

  6. It should allow the user to delete items from the list.


For now these changes are made only to the test data you have created for your application. None of them are saved between application runs. You will work on data persistence in the next unit.

Nov 25, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here