-
for command line input filename, it will only execute reading and appending if the file exists
-
for adding to the list, it will make sure description, price, productID, year are inputted correctly through exception handling.
-
for productId it makes sure it doesn't already exist
-
for productID it makes sure it is 6 digits long
-
if these requirements are not met, it will output a message to the message text area
-
for price, it makes sure it is a positive number
-
for price, it makes sure it is a number
-
if these requirements are not met, it will output a message to the message text area
-
for year it makes sure it is a number between 1000-9999
-
for year it makes sure it is a number
-
if these requirements are not met, it will output a message to the message text area
-
-
for searching to the list, if nothing is inputted in the 4 fields productID, description, start Year, end Year it will display all elements of the ArrayList
- for start Year, if a number is not inputted in its textfield, it will ignore the input
- for end year, if a number is not inputted in its textfield, it will ignore the input
- if start year is less than end year, it will output a message to the search results warning the user that they need to have the end year after the start year.
-
for quitting the program, the user can click the X button at the top right, but is recommended to hit quit through the "Commands" menu. This will append any new information to the textfile if it has been inputted.