I attached a description file.
ITEC 1211 - Spring 2001 CSCI 1301- Project #2 Due on Tuesday, December 3rd Project #2 will cover material found in the first 8 chapters of the book. I do not want you using any program features not found in the first 8 chapters of the book. This project is broken into two separate parts/group of files. Part #1 is weighted higher than Part #2. I would suggest completing most or all of Part #1 before moving onto Part #2. Part #1 If you haven’t done so already, create a folder on your flash drive called CSCI1301-YourLastName. Obviously, you will need to put your own last name here. For example, mine would be: CSCI1301-Murray · Inside the CSCI1301 folder, I want you to create a subfolder called Project2 · Place all of your files in this folder. This will be the graded version of the project · Name the first main file Flight_YourFullName.java (replace YourFullName with your actual first and last name). Name the second file Passengers.java and use the supplied text file PassengerList.txt Flight_YourFullName.java will contain your main method and Passengers.java will contain the class that your array is based on. *Note: You are not allowed to add additional files for Part #1 of the project. This is an individual project, but you may help each other. However, I should not see any programs that are identical. 1) You will be creating a program that will assign passengers to a single flight of a Boom aircraft for United Airlines. This aircraft is still in development. You can learn more about this aircraft at https://boomsupersonic.com/ 2) The flight will: · Carry a maximum of 36 passengers · Your project needs to store all the passengers in a 1 dimensional array of objects based on the class you create in the Passengers.java file. The array needs to be big enough to handle a full flight. · Each object in the array will hold information about one passenger i. Full Name (stored as one value) ii. Seat Class (assigned by the program) iii. Seat # (read it in as a String) iv. Age (read it in as an integer) v. Meal Option(Regular, Asian Vegetarian, Hindu vegetarian, Vegan (strict) vegetarian, Vegetarian lacto-ovo, Child, Gluten-intolerant, Jain, Japanese, Kosher, Muslim, Extra crunchy) · The plane layout will be as follows i. Rows 1-4 will be First Class and will have a single seat in each row (1A, 2A, 3A…) ii. Rows 5-8 will be Business Class and will have 2 seats in each row (5A, 5B, 6A…) iii. Rows 9-14 will be Economy Class and will have 4 seats in each row (9A, 9B, 9C, 9D, 10A…) Passenger input 3) No user input should be included for the first 33 passengers. The first 33 passengers will be read in from the file PassengerList.txt. You will need to modify the text file that I supplied. I supplied you with the first 30 passengers. You are responsible for adding three more passengers to the end of the text file. The simplest way to do this is to open the file up in a text editor and type in three more passenger’s information. Your program should read the information but not alter the file. · You are not allowed to modify the existing data in the text file. You are allowed to add on the 3 passengers at the end of the file. i. Each value is delimited from the next value with a comma. The last item on the line will not have a comma. ii. Make yourself the first of the additional passengers (the 31st in the list). Make up the data for the 32nd and 33rd passenger, but be clean with the names. iii. Each passenger will need to be on a separate line in the file. iv. Every passenger will have: 1. a first and last name(some may have a middle name or initial) 2. The seat class will not be in the file but will be assigned by the program based on the seat they have chosen (first class, business class, or economy class..based on the layout shown above) 3. Seat# (made up of both numbers and letters) * Also use only valid seat numbers based on the previous specification and do not repeat any seat numbers. Currently, the only available seats are 2A, 7A, 10D, 11D, 12D, 14D 4. Collect and store the age 5. Finally, the meal choice. Not everyone will have an assigned meal choice in the file. v. Some passengers will have 4 values on each line, and some will have 3. Make sure you include a minimum of 3 values and a maximum of 4 values for the 3 passengers you add to the text file. Some of the passengers have decided not to choose a meal option. 1. If they have not chosen a meal and they are 18 or older, your program will assign them a “Regular” meal and if they have not chosen a meal and are under 18 your program will assign them a “Child” meal. 2. DO NOT add these meal choices to the text file. Your program will need to figure out the solution and assign the proper values to the object. · Using a loop, your program will scan the file and collect the data. Once the data is collected for a passenger, store it in an object in the array. Place the first passenger (Paul Murray) at index location 0 and work your way up. This needs to be an object based on the class you create. It cannot be a simple String array. 4) After collecting and saving each of the customers from the text file, all other passengers will be collected by the user of the program. The program will continue to collect information until either the flight is full, or the user is finished adding passengers to the flight. At this point there are only 3 available seats. · All prompts and data will be obtained through the standard input/output window. Do not use Dialog Boxes or JFrames. i. Prompt the user and collect the name of the passenger ii. Prompt the user with all the remaining valid seats in the aircraft. This list should not be static. It must change every time a new seat is booked. The user should only be able to choose an unreserved and valid seat#. If the user chooses an invalid option, the program should re-prompt for a valid seat number until the user enters a valid choice. iii. Your program will not prompt the user for a seat class. It should be assigned by the program. The seat class is based on the seat number. For instance if the user chose seat 12D, it should assign them to Economy Class. iv. Finally prompt them for their meal preference. Give them a list of the available options. · Once all the data is collected for a passenger, store it in an object in the array. The first passenger collected from the user will be placed in index location 33. Continue collecting passengers and storing their information in the array until the user stops or you reach the maximum capacity of the flight. · After the data is collected, change Paul Murray’s meal choice to Extra Crunchy in the object. DO NOT change it in the file. This can be accomplished by using the updateMeal method of the class · After the data is collected, change Meg Merwin’s meal choice to Kosher using the updateMeal method · Once the flight is full or the user decides to not enter in any additional passengers and you have changed Paul and Meg’s meal options, output the full list of passengers from the array to the standard output window. Do this with a for loop. Print one passenger’s information per line. This will implement the toString method from the Passengers Class. The Passengers Class The Passengers Class will have the following: 1. Five class variables for the 5 values collected for each object. Note: The full name will go in one class variable. 2. A constructor method that assigns all 5 class variables a value. 3. A method called updateMeal that will take 1 formal parameter to change the meal choice of a passenger. 4. A method called getLastName that will take the value stored in the existing class variable for the name and parse out the last name. This method will later be used directly by the toString method (this means that toString will invoke the method inside the Passengers class file). 5. A toString method that will print out just the passengers last name only (obtained by using the getLastName method), seat class, and seat number, and meal selection. Do not print out the age of the passenger. For Example: Grabowski Business Class 7B Gluten-intolerant Part #2 Create the second program files named Plane.java and Flyit.java · Plane.java will contain a class for drawing the image/listeners/event handler methods etc. The Flyit.java file will contain the main method and the creation of the Jframe · The second program will incorporate a polygon picture you create of the commercial aircraft from the website I referenced earlier. I might recommend using a side-view image of the Boom airplane · You must create the picture with one or more polygons. The better your picture is, the better the design portion of your grade will be. You can “draw” the image from whichever perspective you wish (from the top angle or side angle are popular choices). I want you to draw this with the available polygon features found in Java. I do not want you designing it in a graphics program and importing it as a picture. · You plane will be flying at night, so the background should be a dark blue or black. · I want you to also track airplane speed and display it in the upper right corner of the JPanel. The starting speed of the aircraft should be 212 mph when the program launches. The speed should not drop below 150 mph and should not go above 1,687 mph. When the user presses the “up arrow” on the keyboard, the speed should increase by 5 mph. When the user presses the “down arrow” on the keyboard, the speed should decrease by 9 mph. However, the plane