Program that asks the user for the month and a positive n

Assignment Help Basic Computer Science
Reference no: EM131048746

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.

Reference no: EM131048746

Questions Cloud

Improve organizational performance : How do enterprise applications, collaboration and communication systems, and intranets improve organizational performance? Give examples to illustrate your answer.
A tropical rain forest affect the forest : Logging in the rain forest: contrasts. Figure 29.2 (page 29-5) gives basic ANOVA output for the study of the effects of logging described in Example 29.1. We might describe the overall effect of logging by comparing the mean species count for unlo..
Program using a loop that multiplies two non-negative number : Write code to implement the expression: A= (B + C) * (D - E) on 3-, 2-, 1- and 0-address machines. In accordance with programming language practice, computing the expression should not change the values of its operands.
Analyse house prices against all other variables : Analyse house prices against all other variables included in the dataset. Use appropriate descriptive techniques such as cross-tabulations, comparative summary measures, scatter diagrams to identify key relationships
Program that asks the user for the month and a positive n : 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..
Learn test through short logical assessment : James and Jennifer Stolpa and their five-month old kid, Clayton, were stranded outside in a snowstorm for right around 8 days. These types of individuals were spared after James left Jennifer and Clayton in a natural hollow and climbed 31 mills in..
Accused of using non-job-related criteria : Many employers are accused of using non-job-related criteria in hiring decisions. The best management practice for an employer to use in refuting this type of allegation would mos likely be:
Steady supply in the company : Assume you are the CEO of one of the biggest companies in the united states such as Philips, how will you ensure a steady supply in the company?
Analyse trends and issues in creating learning organisation : Purpose: To allow students to demonstrate their ability to research, critically analyse trends and issues in creating and managing a learning organisation in Australia today. The assessment also allows students to further develop their team wor..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Communication between the prof and students

Write a shell(born) program called prof_mailer. This program has to be interactive. The function of this program is to make the communication between the prof and students very easy as follow,

  Describe a chart or graph

School of information technology.  Describe a chart or graph you might find related to a computer that fits the criteria for a graph of a function.  Make sure to explain in detail why the graph fits the criteria

  Develop a program that will allow the district sales manager

You have been asked to develop a program that will allow the district sales manager to input each of the dealership's ID along with their four quarterly sales volumes for the year, calculate and display each quarter's rebate and the sales bonus fo..

  Why visualization technologies are becoming an important

Determine the main reasons why visualization technologies are becoming an important part of organizational success. Select two (2) such technologies related to information systems and analyze the manner in which the utilization of the selected tec..

  Develop a fact-finding plan including interviews

Design a questionnaire that will go to a sample of Kahuna Cleaning Supply customers to find out if they were satisfied with the sales and ordering process.

  What is the result of issuing 0x08 function code

In a SCADA system, what is the result of issuing 0x08 function code followed by a 0x01 subfunction code on a slave using Modbus?

  Create a class called uabiginteger

Create a class called UABigInteger. As the name implies, we want to create a class that will allow usto store an integer larger than a typical one (a value less than 2,147,483,647). This will be supportedby declaring an array of integers that will be..

  Redesigning security operations

Redesigning Security Operations

  Multiplexors whose control bit allows

Multiplexors whose control bit allows you to select between one of two modes right shift or left shift. Include logic to perform arithmetic shift left and arithmetic shift right . This means you must include logic to perform sign extension in ..

  Create a flexsim model

Create a Flexsim model for a stylist shop that is open for 24 hours in a mall that is always open.

  Eu directive on the protection of personal data

How does the EU directive on the protection of personal data impose requirements on organizations in non-EU countries?"

  Description of the task the pseudo-code

Select a task a program could perform over an array of items that would be useful. Your task must include the following:

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd