Your task is to develop a Java Application that allows the user to read the movie name, lead actor name, lead actress name, theatre name and ticket price from a text file (MovieData.txt), save data in a file (NewMovieData.txt), display data in a text area, sort data by the movie name and search data by the movie ticket price.
The applications GUI components should consist of a menu bar containing 4 menus (Movie Data, Activities, Distributors and Exit) and a text area (Display Area) as shown below. see image.
There are 4 menus (Data, Activities, Distributors and Exit). The Data menu contains 2 items (Read Data and Save Data), the Activities menu has 3 items (List Movies, Sort Movies by Name and Search Movies by Ticket Price), the Distributors menu has 1 item (Details) and the Exit menu has 1 item (Exit). The menu items are described below.
Data -> Read Data: Reads the data from MovieData.txt (see format of this file below) and stores the data in a Linked List or an ArrayList. The application must use appropriate exceptions to deal with problems during the file opening (e.g. what to do if file doesnt exist).
The file contains Movie Name (String), Lead Actor Name (String), Lead Actress Name (String), Theatre Name (String) and Ticket Price (double). A sample file format for MovieData.txt is as follows.
The Dark Tower, Matthew McConaughey, Idris Elba, Harbour Town Cinema, 18
Terminator 2, Arnold Schwarzenegger, Linda Hamilton, City Myer Cinema, 14
All Saints, John Corbett, Cara Buono, Sunny Bank Cinema, 12
Data -> Save Data: Saves all the data from ArrayList/LinkedList to NewMovieData.txt file. The new file contains movie name, theatre name and ticket price. It also contains the total number of movies. The format for NewMovieData.txt file is as follows.
The Dark Tower, Harbour Town Cinema, 18
Terminator 2, City Myer Cinema, 14
All Saints, Sunny Bank Cinema, 12
Total Number of Movies: 3
The application must use the appropriate exceptions to deal with problems during the file saving.
Activities -> List Movies: Lists all movies from ArrayList/LinkedList in the display area as shown below. see image.
Activities -> Sort Movies by Name: Sorts data by the movie name in ascending order using the best sorting algorithm covered in COIT20256 unit and displays sorted data in the display area as shown below. You are not allowed to use any built-in sorting algorithm. see image.
Activities -> Search Movie by Ticket Price: Asks the user to enter a movie ticket price via a dialog box as shown below and uses the best searching algorithm covered in COIT20256 unit to search for the given movie ticket price. It displays appropriate message found or not found in display area. see image.
Distributors -> Details: Provides the user with up to 4 distributor names, addresses and phone numbers.
Exit -> Exit: Allows the user to exit the application.
Data Validation
Input data validation for the Movie Ticket Price entered to search is required. If no movie ticket price is entered or entered ticket price is less than $2 and OK button is pressed then the application will pop out a message box with an appropriate message.
Data Structures and Algorithms
You must use:
Evaluation and Analysis of Data Structures and Algorithms