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:

  • LinkedList or ArrayList for storing movie object.
  • Best searching algorithm (based on your analysis) covered in COIT20256 unit for searching.
  • Best sorting algorithm (based on your analysis) covered in COIT20256 unit for sorting.
  • Two classes to implement the application. One class, named Movie which describes an individual Movie (fields such as Movie Name, Lead Actor, Lead Actress, Theatre Name, Ticket Price and get and set methods) and another class named MovieApplication which contains GUI with components and methods for sorting, searching and file processing.
  • Appropriate fields and methods to store/process movie data.

Evaluation and Analysis of Data Structures and Algorithms

  • You must justify the reason for selecting the data structure (ArrayList or LinkedList). Why do you think that the data structure used by you is the best data structure for your application? Write maximum 2-3 lines to answer this question in Report.docx.
  • You must justify the reason for selecting the sorting algorithm. Why do you think that the sorting algorithm used by you is the best sorting algorithm for your application? Write maximum 2-3 lines to answer this question in Report.docx.
  • You must justify the reason for selecting the searching algorithm. Why do you think that the searching algorithm used by you is the best searching algorithm for your application? Write maximum 2-3 lines to answer this question in Report.docx.
  • You must run your application 3 times by increasing the data each time (e.g. 10 movies, 100 movies, 1000 movies) and compare time for sorting algorithm. Write in Report.docx, the time taken to sort in each case.
  • You must run your application 3 times by increasing the data each time (e.g. 10 movies, 100 movies, 1000 movies) and compare time for searching algorithm (use same search key each time). Write in Report.docx, the time taken to search in each case.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.