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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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