top-movies-java

Page 1

Download:

https://solutionzip.com/downloads/top-movies-java/

Write a Java program to do the following :• Use this file for input movies.txt (see attached file)• Load the records to an array• Sort the movies by Year• Report1 – Output Report1 to console (see sample report)Current Date and Time “Top Movies of All Time – Sorted by Year” List all movies in order by year • Sort the Array by Title (you will need to figure out a way to do this)• HINT: There are several ways that you can manipulate this data to get it sorted by title. One way is to use the .replace() string method or .replace() Arrays method.• Report2 – Output Report2 to ConsoleCurrent Date and Time “Top Movies of All Time – Sorted by Title” List all movies in order by Title • Output to a txt file named moviesYYYY-MM-DD_hh-mm.txt, all movies released from 2000 to present. See the “Research Challenge” below for specifics on formatting the file name.•METHODSsFileToArray() – setup this method to be able to open ANY file of String data and input that data into an array. You determine the appropriate arguments and return value. Ask the user to enter the name of the file and the number of records in the file. Use this method in your program, when you load your array of movies. sFileOutput – setup this method to be able to output ANY String data to a file. You determine the appropriate arguments and return value.


Use this method in your program, when you write your 2000 – Present movies to a file. report1() – setup this method to create and output report 1. You determine the appropriate arguments and return value. report2() – setup this method to create and output report 2. You determine the appropriate arguments and return value. Write all the methods in the SAME class file as your main(). (This will make it easier for me to grade).Challenge (REQUIRED) :• Format the file name of your .txt output file with the current date and time as follows.moviesyyyy-mm-dd-hh_mm.txt. This is called a dateTime stamp and is a useful way to create an archive of files. Each time your program creates a new file it will automatically have a unique file name identified by the current date and time it was created. For example: Your file would be movies2021-11-24-14_54.txt if it was created on November 24th, 2021 at 2:54pm. Download:

https://solutionzip.com/downloads/top-movies-java/


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.