Calculate and display running total of yesterday receipts

Assignment Help Basic Computer Science
Reference no: EM13219742

A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Write an application that calculates and displays the parking charges for each customer who parked in the garage yesterday. You should enter the hours parked for each customer. The program should display the charge for the current customer and should calculate and display the running total of yesterday's receipts. The program should use the method calculate-Charges to determine the charge for each customer. Your output should appear as follows: Enter number of hours (a negative to quit): 2 Current charge: $2.00, Total receipts: $2.00 Enter number of hours (a negative to quit): 10 Current charge: $5.50, Total receipts: $7.50 Enter number of hours (a negative to quit): -1

Reference no: EM13219742

Questions Cloud

Write a program that prompts the user : Java: Write a program that prompts the user to enter the number of students and each student's name and score, than display the name of the student with the highest score.
What is a corporate strategy : What line of work is the company and what products or services does the company provide and From a strategy perspective, what is a corporate strategy
What drives excessive technology investments in each model : Explain how either the Newhouse model or the Physician Workshop model could explain why hospitals might inefficiently over-invest in expensive, new technologies. What drives excessive technology investments in each model
Write the definition of a class counter containing : Write the definition of a class Counter containing: An instance variable named counter of type int An instance variable named limit of type int . A constructor that takes two int arguments and assigns the first one to counter and the s..
Calculate and display running total of yesterday receipts : calculate and display the running total of yesterday's receipts. The program should use the method calculate-Charges to determine the charge for each customer.
Compute the maximum safe diameter w of the port : The vessel will contain gases at pressures up to 210.0 MPa. The student's design calls for an observation port on the side of the vessel (see diagram below). The bolts that hold the cover of this port onto the vessel can safely withstand a force o..
Write a program for line clliping : Write a program for line clliping. Take co-ordinate of 2 point as input and also take 4 co-ordinates of window. It should clip the line outside the window. Dont use built in function like line or rectangle to draw line or rectangle.Use dda line al..
Determine what is the amount of excess reserrves : This bank can safely expand its loans by what amount c.by expanding its loans by this amount in part (b), its checkable deposits would expand to what amount (if all loans were made to ch3ecking account customers)
What stable monetary policy has been highly erratic : The velocity of M1 money has moved erratically in the past several years because Answer of low and stable rates of inflation of regulatory changes allowing banks to pay interest on checkable deposits interest rates have been stable monetary policy..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Write a program that reads in an integer value

Write a program that reads in an integer value for n and then sums the integers from n to 2*n if n is nonnegative, or from 2*n to n if n is negative. Write the code in two versions: one using only for loops and the other using only while loops.

  Create system for payment to contributors using smil and svg

Using SMIL and SVG, how would you execute a system for making sure payment to contributors based on usage of their contribution?

  Describe what each of the two-dimensional characters

Describe what each of the two-dimensional characters might represent and the data that would be held in the array. Also, provide an example array declaration.

  Write code that fills an array with each set of numbers

Write code that fills an array with each set of numbers below. a. 1 2 3 4 5 6 7 8 9 10 b. 0 2 4 6 8 10 12 14 16 18 c. 1 4 9 16 25 36 49 64 81 100 d. 0 0 0 0 0 0 0 0 0 0 e. 1 4 9 16 9 7 4 9 11

  Write a program that uses a two-dimensional array

Write a program that uses a two-dimensional array of characters to hold the five student names, a single-dimensional array of five characters to hold the five students' letter grade, and five singe-dimensional arrays of four doubles to hold each s..

  Achieving greater maturity that addresses funding priorities

Explains a set of recommendations for achieving greater maturity that addresses funding priorities. Explain a set of recommendations for achieving greater maturity that addresses key management capabilities.

  What does it mean to spawn a process?

Process can be in different states to allocate the resources better. List the symbol and meaning for each of these states. 2. What does it mean to spawn a process?

  Register mapping and then any possible

First do the register mapping and then any possible instruction reordering. How many machine registers are used? Has there been any pipeline improvement?

  Given a coin such that the probability of observing heads

given a coin such that the probability of observing heads is ph=.4 and the probability of tails is pt=.6 compute the probability of observing 3 heads after 7 tosses.

  Which of the following is true

Which of the following is true? a. A program can call, at most, one method. b. A program can contain a method that calls another method. c. A method can contain one or more other methods. d. All of these are true

  Use the random class to randomly fill array list1

Use the Random class to randomly fill array list1 and then copy that array to list2 and list3. Use of the int data type is preferred.

  Project in designated area of coastal zone is significant

Have you contacted State Historic Preservation Office (SHPO) to see if the project is in designated area of coastal zone which is significant to the study, understanding, or illustration of national, state.

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