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

  Advantages and disadvantages of using software as a service

Discuss the fundamental advantages and disadvantages of using software as a service (SaaS) within organizations. Next, give your opinion as to why SaaS has become a common delivery model for many business applications.

  Visit the web sites of the major technology organizations

Visit the Web sites of the major technology organizations

  Top current it issues in higher education

Discuss Five of the top current IT issues in Higher Education

  Communications manager for international gadgets

As the new communications manager for International Gadgets, you have come across many examples of ineffective communications, including some older directives that were never carried out, mostly because of their unclear nature.

  Which vulnerability be evaluated for extra controls first

If organization has three information assets to evaluate for risk management as shown in accompanying data, which vulnerability must be evaluated for additional controls first? Which one must be evaluated last?

  What is an iteration structure?

What is an iteration structure?

  Write a shell script called uncomp

Write a shell script called uncomp

  Solve decanting problem using euclidean algorithm

Use Euclidean algorithm to solve decanting problem for decanters of sizes 1317 and 1075. Or we can say, determine integers x and y.

  Demonstrate ability to produce a specified table of output

Demonstrate ability to produce a specified table of output. Demonstrate ability to convert a flowchart into a working MATLAB script file.

  What are ids and ips

Write a 2-3 page paper that fully answers the questions.

  Riordan manufacturing virtual organization

An increase in spending on items related to hardware, software, and outside IT support services by 4 percentA decrease the overall budget by 2 percent

  Ipo chart its components and benefits to program development

Discuss the IPO chart, its components, and its benefits to program development. In your opinion, what would be the impact if one of these components were omitted? Thoroughly explain.

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