A program to simulate a cash register change calculator

Assignment Help Basic Computer Science
Reference no: EM13849215

Write a program to simulate a cash register change calculator. Assume that you have two double variables that have been declared and initialized with some values: cost and amtPaid. Assume that amtPaid is greater than or equal to cost. 

cost represents the amount that the customer owes to the store, and amtPaid is the amount that the customer is giving to the store. Your program should calculate and print the total change due, and print how to give back the change.

For example, if cost is $52.32, and the amtPaid is $100, your program should print:Your change is $47.682 $20 bill(s)1 $5 bill(s)2 $1 bill(s)2 Quarter(s)1 Dime(s)1 Nickel(s)3 Penny(ies)You don't have to use dollar amounts greater than $20 in giving back your change. Your code should not print anything for a change amount that is not used; for example, do not print "0 $10 bill(s)" in the example shown above.(Recall that 47.68 - (int)47.68 would be 0.68.)

 

 

Reference no: EM13849215

Questions Cloud

Long-term debt financing-new long-term debt : At year-end 2015, Wallace Landscaping’s total assets were $1.9 million and its accounts payable were $440,000. Sales, which in 2015 were $2.7 million, are expected to increase by 30% in 2016. Total assets and accounts payable are proportional to sale..
Develop an action plan identifying key tasksand : Develop an action plan identifying key tasksand / or processes involved in changing from Windows 7 to Windows 10 and how they will change
Management prefers to get the server with the os : Management prefers to get the server with the OS already installed and wants to keep management tasks as simple as possible. which windows server 2012/r2 edition do you recommend? explain your answer please ?
A firm wishes to maintain an internal growth rate : A firm wishes to maintain an internal growth rate of 9 percent and a dividend payout ratio of 25 percent. The current profit margin is 9 percent, and the firm uses no external financing sources. What must total asset turnover be? Round your answer to..
A program to simulate a cash register change calculator : Write a program to simulate a cash register change calculator. Assume that you have two double variables that have been declared and initialized with some values: cost and amtPaid. Assume that amtPaid is greater than or equal to cost.
Desires sustainable growth rate : Boyd Crowder's Chowder, Inc. desires a sustainable growth rate of 3.8 percent while maintaining a 49 percent dividend payout ratio and a 4.9 percent profit margin. The company has a capital intensity ratio of 1.21. What equity multiplier is required ..
About australian exchange rate : Using Demand and Supply model of exchange rate determination briefly explain how AUD is determined in the forex market, and what factors influence its fluctuations.
Assume the company maintains its current operating capacity : Lloyd and Harry Limo Service, Co. is currently operating at 92% of fixed asset capacity. Fixed assets on the balance sheet are $593,000. Current sales are $640,000, and are projected to grow to $792,000. How many in new fixed assets are required to s..
What was total long-term debt and total liabilities : At year-end 2015, Wallace Landscaping’s total assets were $1.9 million and its accounts payable were $390,000. Sales, which in 2015 were $2.1 million, are expected to increase by 20% in 2016. What was Wallace's total long-term debt in 2015? How much ..

Reviews

knj849215

10/6/2016 5:21:49 PM

This is a programing assignment and i m new to this so i need expert help which i think you may do so. Please check the requirements and let me know how much it should be. I have enough time to complete it.

Write a Review

Basic Computer Science Questions & Answers

  Locate vendors of biometric products

Using the Web, locate vendors of biometric products. Find one vendor with a product designed to examine each characteristic mentioned in your textbook. What is the CER associated with each product? Which would be more acceptable to users? Which..

  Calculate performance of cache and the average cpi

Assume the instruction cache miss rate is 0.5% and the data cache miss rate is 1%. Calculate the performance of the cache (CPU execution time) and the average CPI.

  Pieces of information is contained within an ip address

What two pieces of information is contained within an IP address? How does the computer tell the difference between these two parts?

  Cloud technology and virtualization

With the merger of your company with a multinational company, you have come to realize that progressive solutions are necessary to defray some of the associated information technology costs

  Describe the federal laws

Describe the federal laws that address protecting an individual's PII.

  Create a jframe that uses borderlayout

Create a JFrame that uses BorderLayout. Place a JButton in the center region. Each time the user clicks the JButton, change the background color in one of the other regions. Save the file as JColorFrame.java.

  Complete the one-variable data table

As a student at USI and a member of the budget committee for theMadrigal Feaste, you have been given a partially completed workbook, MadrigalFeaste.xlsx, and asked to complete the project.

  How will you run a process in background

How will you run a process in background? How will you bring that into foreground and how will you kill that process?

  Calculate the minimum distance from the start to the goal

Calculate the minimum distance from the start to the goal with passing all the checkpoints -Specification * A map consists of 5 characters as following.

  What value is the log function sensitive

If x~y(both have values close to each other but not same), then we would expect some cancellation in computing log(x)-log(y). on the other hand, log(x)-log(y)=log(x/y), and the latter involves no cancellation. Does this mean that computing log..

  What will a back-propagation network for problem

What will a back-propagation network predict for this example, assuming that it has been trained and reaches a global optimum?

  Evaluate for risk management purposes

Choose three information assets that a typical organization has and evaluate for risk management purposes which vulnerability should be evaluated for additional controls first?

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