Question
A working program implemented in Java. As a minimum, it must enable the user to enter data, which must be stored (so it persists between
A working program implemented in Java. As a minimum, it must enable the user to enter data, which must be stored (so it persists between application launches), and it must be able to retrieve the data from storage and present it to the user. Your program code should be self-documenting this means it must use meaningful class, method, and variable names; be clearly commented where necessary and indented to reflect the logic of the program, and control mechanisms such as loops, conditions and data validation routines should be implemented correctly. The submitted project should include 5 records which must be loaded from a saved file when the application is run (Do not include these items in the Java code) The application must allow the user to enter details pertaining to an item in a collection. More than one piece of data must be stored in relation to each item (the name of the item will not suffice). A class must be used to represent the item being stored. o This class must have at least two properties, and a maximum of 5 o There must be at least two different types of properties o It must have a constructor with parameters which must be used o It must have appropriate getters (accessors) o Fields in the class must be private o The class must be in its own file, separate from the rest of the program logic Data must persist between launches of the operation (i.e., it must be stored in a file). o This functionality must be implemented using Serializable. The user must be able to display a list of all items previously added to the collection. The user must be able to choose to exit the application and the application must only terminate when the user chooses to exit (i.e., they should be presented with some form of menu once they have completed any given operation, rather than having to relaunch the application multiple times) You should not set a limit on the number of items that can be stored (you can, however, assume it will be fine to write an entire collection to persistent storage in one go, and should not worry about the performance implications this could have for large collections). In addition to the above functionality The application must not throw exception that is not caught (i.e., crash) if the user were to input a value that is not in the format expected When values are entered by the user in the wrong format, the application will allow them to try again until they get it correct, without losing any data entered so far. A user must be able to remove individual items from the collection. A user must be able to edit individual properties of individual items. Replacement of one object with another does not constitute editing for the purpose of this criteria, therefore, to meet this criterion, the class must have at least one setter (mutator) One of the properties must store an enum value Unit tests must adequately test a fair proportion of the code. The user must be able to sort the items in the collection on one of its properties (for example, for a Blu-ray this could be Title, Rating, Price etc.) This functionality must be implemented using by implementing the Comparable interface. There must not be repeated code in the implementation, nor should there be any particularly large methods1 (i.e., code should be refactored into (small) methods where appropriate)
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