Demonstrate the class in a program

Assignment Help Basic Computer Science
Reference no: EM131014845

Q Write a CashRegister class that can be used with the RetailItem class that you wrote in Chapter 6's Programming Challenge 4. The CashRegister class should simulate the sale of a retail item. It should have a constructor that accepts a RetailItem object as an argument. The constructor should also accept an integer that represents the quantity of items being purchased. In addition, the class should have the following methods: - The getSubtotal method should return the subtotal of the sale, which is the quantity multiplied by the price. This method must get the price from the RetailItem object that was passes as an arugument to the constructor. - The getTax method should return the amount of sales tax on the purchase. The sales tax rate is 6 percent of a retail sale. - The getTotal method should return the total of the sale, which is the subtotal plus the sales tax.

Demonstrate the class in a program that asks the user for the quantity of items being purchased, and then displays the sale's subtotal, amount of sales tax, and total

Reference no: EM131014845

Questions Cloud

Calculate the projects annual free cash flow : Breakeven Sensitivity Analysis The Clayton Manufacturing Company is considering an investment in a new automated inventory system for its warehouse that will provide cash savings to the firm over the next five years.  Calculate the project’s annual f..
Expected interest rate on a one-year treasury bond : As of 09/17/2014, what was the expected interest rate on a one-year treasury bond on 09/17/2015? Please use the expectations theory. As of 09/17/2014, the expected interest rate on a one-year treasury bond If there the expected and the actual interes..
Approximate the maximum possible percent error : Approximate the maximum possible percent error in the calculated volume by using the total differential as an approximation to volume change.
Returns for the first investment will be paid in nominal : You have $2000 to invest, and are choosing between two projects, both of which cost $2000 up front and will yield six years of returns. The returns for the first investment will be paid in nominal $, starting at $400 a year from now and increasing at..
Demonstrate the class in a program : Demonstrate the class in a program that asks the user for the quantity of items being purchased, and then displays the sale's subtotal, amount of sales tax, and total
Which project has the higher equivalent annual net benefit : The company you work for is trying to decide between two projects. Project 1 costs $200,000 up front, and has an expected life of 5 years, over which it will return $40,000 each of the five years. Project 2 would last for 15 years, costs $1 million u..
Tuition financing plan : Wayne State offers a tuition financing plan where a $40,000 loan taken at the beginning of the freshman year would pay for all 4 years of college tuition. The plan calls for the loan to be repaid over a ten year period starting 5 years from the date ..
Find the distance between the two parallel planes : Find the distance between the two parallel planes : 5x + y - z = 1 and 10* + 2y - 2z = 5. You should be able to use your plan above to help with this one.
Define a class client which has attributes name : Your menu should allow you to add new clients, accept payments from clients using the client's name, make loans, look up a client's balance, remove a client,

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Change the number of parameters an operator takes

"You cannot change the number of parameters an operator takes." What does this really mean and what are implications of this when you use polymorphism in your programs? Try to provide specific examples and 600 words.

  What is the role of the project sponsor

Make sure that you briefly describe why each of the listed tasks is critical to the success of the project and how each of the listed skills helps the project manager.

  Secure company-wide network infrastructure

The case study company (Soulmate Ventures) has expressed a desire to have a secure company-wide network infrastructure. Because the network has to revaluated from the beginning, the company wants to ensure that the new network has as many reasonab..

  Explain in detail why the forms of non-repudiation

Explain in detail why the forms of non-repudiation

  Generate a histogram for all the grades

Generate a histogram for all the grades. Each score represents one dot on the histogram.

  How many frames are destroyed

In a Standard Ethernet LAN, the average size of a frame is 1000 bytes. If a noise of 2 ms occurs on the LAN, how many frames are destroyed? Also repeat this problem with Gigabit Ethernet LAN.

  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.

  Conduct research on the types of computer networks

Conduct research on the types of computer networks

  What type of attack was launched on doj?

What type of attack was launched on DOJ?

  Logical structure of active directory

How would you design the logical structure of Active Directory for the Rough Country Miles of Alaska, and what domain naming structure would you suggest?

  Memory explain the allocation of memory cells when a

explain the allocation of memory cells when a function is called. what is stored in the function data area for an input

  How does one convert logical data to numerical data

How does one convert logical data to numerical data? And I know it is not the real function, because that just finds the real part of a complex value.

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