[Solved] SOLVED:Assignment 4 Theater

$25

File Name: SOLVED:Assignment_4_Theater.zip
File Size: 254.34 KB

SKU: [Solved] SOLVED:Assignment 4 Theater Category: Tag:
5/5 - (1 vote)

The iPic Theater shows most popular new movies. It keeps a database of movies that contains information about movies and their current week sale. iPic Theater also keeps a record of previous weeks sale for the SAME movies in a different database to compare sales for two weeks.Write a Data Element class named Movie that holds the data for a movie. There will be a movie title, rate (PG, PG13, R), 10 viewers review (numbered 1-5) and the number of sold tickets for the current week.Write a Data Manager Class named MovieTheater that holds a list of movies in an ArrayList. It also holds the average of reviews for each movie in a separate ArrayList. Note that average list is created at the same time when movies list is created. This class will have methods to load movies information from a file and store it in an Arraylist as well as their average, find the list of movies with highest and lowest reviews and the total sale. It will also have a method to compare current sale for each movie with a previous sale and report the list of movies that their sale has been increased.Write a GUI class that allows the user to load movies information from a file, show highest and lowest average review, compare sale and find total sale.OperationWhen application starts, user is presented with a GUI to show movies information:User can select Load Movie and select the file containing movies information. The application then displays movies name, rating, reviews, average reviews and #of sold tickets.When user selects High/Low Average, the list of movies with the highest and lowest average review will be displayed.When user selects Compare and chooses the file containing movies previous week, the list of movies that their sales has been increase will be displayed.Total Sale will calculate the total sale.Exit will exit the application.SpecificationsData Element -MovieThe class Movie will contain:1. Instance variables for movie title, rating, an array of int of 10 viewers reviews (numbered 1-5) and number of sold tickets.2. Method calAvgReview to calculate and return average of reviews.3. Constructors (a copy constructor and parameterized constructor) and getter and setter methods.Data Structure An ArrayList of Movie to hold movie information and an array list of Double holding the average reviews for each MovieData Manager MovieTheater, This class should not have any output functionality (e.g., no GUI-related or printing related functionality), but should take input, operate on the data structure, and return values or set variables that may be accessed with getters. An instance of this class should be created in the GUI and applicable methods called to execute the program.The class MovieTheater will contain:1. Instance variables of an ArrrayList of Movie and an ArrayList of Double.2. Method addMovies Pass in a parameter of type Movie. It will add the movie it to the list of movies. It also saves the average review for each movie in the ArrayList of Double.3. Method highestAndLowestReview Returns a string showing the list of movies with the highest and lowest average review.4. Method compareSales- Pass in an ArrayList of Double, returns a String showing the list of movies which their sale have increased by comparing each movies sale with the corresponding number in the array list passed in.5. Method getTotalSale() returns total number of sale.You may need additional methods to include in this class.User Interface Contains instance variables for labels and textboxes, buttons and an instance variable of MovieTheater :1. Implements the EventHandler to listen to the GUI buttons.2. When the Load Movies button is clicked the movies information is read from a file and displayed in the appropriate text boxes .Use a FileChooser to allow the user to select the file to read from. The file will contain the following information for each movie on a separate line:TitleRating10 user reviews (separated by space)#of sold tickets3. When the High/Low Reviews button is clicked, a dialog box will show the list of the movies with highest and lowest reviews by calling highestAndLowestReview() method from the Data Manager class.4. When the Compare button is clicked, a FileChooser will allow the user to select the file that contains # of sale for the previous week for each movie. This file will have the following format:Movie Name#of sold ticketsIt will call compareSales() of the manager class and will display the list of the movies that have an increase in their sale amount.5. Total Sale button, will set total of sales text box by calling getTotalSale() of the manager class. All the buttons except Load Movies and exit should be disabled at the beginning. Once information is loaded they will be enabled. All the text boxes are non-editable. Assume that the file format is correct.File containing movie information: File containing previous week sale:When application starts:When Load Movies is selected:When High/Low review is selected:When Compare is selected:When Total Sale is selected:Program Grade Sheet Assignment #4Name ________________________________DOCUMENTATION Total 25 pointsJavadoc for all user created classes 7 pts _____You have been asked to use an ArrayList for holding Movie information in DataManage(MovieTheater ) class. Can you use a regular array instead? What are the Pros and Cons of using ArrayList over an Array? How would you change your interface to benefit from ArrayList structure? 5 pts _____(Include your answer in the word document containing your test cases screen shots)Test your application with 3 files having different number of movies. 10 pts _____Do not exceed 20 movies.PROGRAMMING Total 75 pointsInternal class Javadoc documentation (within source code) 5 pts _____Description of what each class doesAuthors Name, @authorMethods commented properly using Javadoc documentsDescription@param, @returnCompiles and Runs without runtime errors or warnings 10 pts _____Program user interfaceClear to user how to use buttons 3 pts _____Output is easy to understand 3 pts _____AccuracyPublic tests files given to you to read data from 10 pts _____Private tests other tests run by the instructor 10 pts _____Program DetailsData Element Movie 12 pts _____1. Instance variablesTitle, rate, array of int for reviews, # of sold tickets2. Methods: constructors, getters and setters,method to calculate average of reviewsData Manager MovieTheater 12 pts _____1. Instance variablesArrayList of MoviesArrayList of Double2. Methods addMovies, highestAndLowestReview,compareSales, getTotalSaleGUI MvGui 10 pts _____1. Uses an object of the MovieTheater2. Use of arrays to hold text fields3. Load Movies, High/Low Review,Compare, Total Sale and Exit buttons handled by implementing EventHandler interface.4. Uses the FileChooser to read from files5. Uses DataManager class (MovieTheater) methods to send and receive data6. At the start of the application only Load Movies and Exit buttons are enabled7. Text fields are non-editable.Total 100 pts _____

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED:Assignment 4 Theater
$25