Write a program that asks the user for the month april may


Write a program that asks the user for the month (April, May, or June) and a positive integer n. Your program should then print two types of results. The first should report the title of the first movie that has first been rented (scanned) n times in that month. For example, the following is an actual example using this data. The output is correct in this example, so you can use it as one test of your results:
Please enter the month by typing April, May, or June: April
Please enter a positive integer: 3
The first movie rented 3 times in April was On The Waterfront (1954).
The second part of your output should contain a listing of all movies that were rented exactly n times during the entire month. For example, the following output is also correct, based on april.txt:
There were 16 movies rented exactly 3 times in April:
ID Title
-- ---------------------------------------
5 Lawrence of Arabia (1962)
12 Sunset Boulevard (1950)
14 Some Like it Hot (1959)
15 Star Wars (1977)
26 Dr. Strangelove (1964)
27 Bonnie and Clyde (1967)
33 High Noon (1952)
35 It Happened One Night (1934)
45 A Streetcar Named Desire (1951)
49 Snow White and the Seven Dwarfs (1937)
51 The Philadelphia Story (1940)
60 Raiders of the Lost Ark (1981)
68 An American in Paris (1951)
74 The Gold Rush (1925)
92 A Place in the Sun (1951)
99 Guess Who's Coming to Dinner (1967)
Your output should look exactly like this, including the sentence before the table, the header, and the order of the IDs and Titles in the table (i.e., in ascending order according to ID number). You will need to read at least parts of both files (the month, and the catalog) to accomplish this. You should think carefully about how to keep track of totals for each title in an array. If there is a tie for most or least times, your program should print out the movie with the lowest id. Hand in output of testing this for April, May, and June, in that order.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a program that asks the user for the month april may
Reference No:- TGS01394608

Expected delivery within 24 Hours