CSC 15 lab 11 Due in one week This lab will combine many of the elements we have learnt, including objects, strings, arrays, loops, and most recently, exceptions and file IO. You'll also be writing the program completely from scratch this time. You can, however, look at my "students" program for guidance. Basically, the idea is to create a database of movies and write a number of operations on the database. One of the operations will be to write the database to a output stream in XML format. Here's a sample, in XML, of what kind of information we want to represent: 2003 sci-fi Kenu Reeves good special effects, bad kung fu 2.5 2001 adventure bilbo great movie, well acted, too many dead orcs 3.5 2003 action arnold now governor, will arnold be back? 3.0 -------------------- You are to: 1. Write a class representing a single movie. The class should contain fields that represent the following information: title of movie (String) year of release of movie (int) genre of movie (String) The principal actor of the movie (String) synopsis (or review) of movie (String) rating of movie on a scale of 0-4 (double) You should have AT least the following methods: constructor: sets the title, year and genre of the movie a method that sets the synopsis. a method that sets/changes the rating accessor methods (gettitle, getyear, etc) that return each of the internal values of the object. public void writeXML(PrintWriter) - write out the object's info using the PrintWriter provided. 2. You are now going to create another class, one that will contain an array of movie objects (similar to the class that contains an array of student objects that I did in class). This class should contain private movie[] Movies; This array will be created in the constructor of the class to be of length 1000, indicating the MAXIMUM number of movies you can store. The ACTUAL number of movies in the database is controled by: private int size; That is, the size variable is the number of movies that are in the array. Movies[0] through Movies[size-1] are movie objects, and the rest of the array contain null pointers. Initially, size should be zero. Write the following methods in the class: getsize - returns number of movies. public void addmovie(movie m) - add the movie m to the array, incrementing size. IF size becomes greater than 999, THROW new EXCEPTION("array full")! public String getsynopsis(String title) that returns the String that represents the of the movie. If the title is not found in the array, your function should return the string "movie not found". public void sort() -> sort the array by their rating - the best movie become the first element of the array. public String bestmovie() -> should return the title of the best movie (by rating) in the array. public void writeXml(PrintWriter pw) writes the entire array of movie objects out to file in xml format that is consistent with the above example. --- finally, in main, you are to create a database of at least 5 movies, and demonstrate your methods.