Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91773170

Have any Question?


Related Questions in Computer Engineering

Suppose that a block can contain at most four data values

Suppose that a block can contain at most four data values and that all data values are integers. Using only B+ trees of degree 2, give examples of each of the following : a. A B+ tree whose height changes from 2 to 3 whe ...

The richter scale is often used to measure the strength and

The Richter scale is often used to measure the strength and potential damage caused by an earthquake. Design and write an algorithm which accepts as input a Richter scale reading and then prints a message indicating the ...

Question what is stuxnet and what are its real-world

Question : What is Stuxnet and what are its real-world implications? Should your national government be concerned about the potential of a Stuxnet-like attack? Why or why not.

Espn pays the nfl 11 billion per year for 8 yrs for the

ESPN pays the NFL $1.1 Billion per year for 8 yrs for the right to exclusively televise football. What is the NPV of the investment if the parent Disney CO has an opportunity interest rate that is equal to the cost of ca ...

Question define four different conflicts you have

Question: Define four different conflicts you have encountered. These conflicts can be work related or personal conflicts. Need in APA Format, 300 words, No Plagiarism. The response must be typed, single spaced, must be ...

Question answer both question with minimum 150 words each

Question: Answer both question with minimum 150 words each. Provide examples and references. 1. Data Anomalies - Explain in your own words using tables from your lab project. Also describe how such anomalies could be pre ...

Question suppose we carry out a binary search of an ordered

Question : Suppose we carry out a binary search of an ordered list of 63 items: We are searching for an item X which occurs exactly once in the list. How many comparisons are carried out i. in the worst case scenario ii. ...

Should you perform a log transformation on a categorical

Should you perform a log transformation on a categorical (nominal) variable, or can you only do that for continuous variables?

Question suppose that the tuition for a university is 10000

Question : Suppose that the tuition for a university is $10,000 this year and increases 5% every year. In one year, the tuition will be $10, 500. Write a program that displays the tuition in ten years and the total cost ...

Question 1 why is it critical for an organization to have a

Question: 1. Why is it critical for an organization to have a DoS attack response plan well before it happens? 2. Please discuss the techniques used by malware developers to disguise their code and prevent it from being ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As