Write program to calculate total cost of customer''s purchase

Assignment Help Other Subject
Reference no: EM13271064

A local retailer has hired you to write a program to calculate the total cost of a customer's purchase. The customer may purchase Snaps, Red Hots, or Mike-N-Ikes. Snaps are sold for $1.60 a box, Red Hots for $1.20 a box, and Mike-N-Ikes for $1.80 a box. A sales tax of 5% is added to the total cost of the candy.

Write a Java program that satisfies the above description.

Requirements:

The number of Snaps, Red Hots, and Mike-N-Ikes must each be obtained from the user and stored in an appropriately typed local variable.

The correct pre-tax subtotal must be calculated and returned by a static method and stored in an appropriately typed local variable in main.

The correct tax must be calculated and returned by a static method and stored in an appropriately typed local variable in main.

The pretax subtotal, tax, and total cost must be displayed to the user in a reasonable report format by a static void method.

Sample run:

Enter the number of Snaps to purchase: 10

Enter the number of Red Hots to purchase: 10

Enter the number of Mike-N-Ikes to purchase: 0

Subtotal: $28

Tax: $1.4

Total: $29.4

Reference no: EM13271064

Questions Cloud

Marketing implementation for a new product called apple tv : The brand is Apple and our idea for a new product is Apple TV. Apple TV gives people the option to have music, photos and videos stream from the computer onto a TV. Apple TV has a wide variety including blockbuster movies, TV series and your favorite..
Purposes of data exploration : What are the main advantages and limitations of the boxplot for purposes of data exploration?
Discuss suicide and the elderly : Discuss suicide and the elderly. Discuss how aging impacts an individual and the CNS illnesses that impact the elderly.
General characteristic-the different stages of development : Discuss the general characteristic, the different stages of development, andwhy juveniles present special issues for negotiators.
Write program to calculate total cost of customer''s purchase : A local retailer has hired you to write a program to calculate the total cost of a customer's purchase. The customer may purchase Snaps, Red Hots, or Mike-N-Ikes. Snaps are sold for $1.60 a box, Red Hots for $1.20 a box, and Mike-N-Ikes for $1.80 a b..
Delivering happiness-strategic marketing adaptation : How would you define Zappos’ target market, and how would you describe its strategy to serve this market? Has Zappos’ emphasis on customer satisfaction contributed to its profitability? Explain. Discuss potential key changes in technology, communicat..
Role of value in developing long-term customer relationships : Discuss the role of value in developing long-term customer relationships. In your discussion, explain the value formula and its component parts. How can the value formula help marketers design strategies to optimize customer value?
Indicators are used to measure abstract concepts : Indicators are used to measure abstract concepts. List some indicators that might prove to be reliable and valid in measuring the following concepts.
Competitor profiles for a healthcare organization : Complete two competitor profiles for a healthcare organization. The healthcare organization could be your current (or former) employer or the organization in your marketing plan.

Reviews

Write a Review

Other Subject Questions & Answers

  Find thorough statistical analysis to back up statements

Which fund would be your best choice for investment? How do you state best in this case? Explain your answer in detail.

  Competency and insanity

To further understand the differences between competency and insanity, as well as the challenges of prosecuting mentally ill offenders, consider the following questions:

  Explain demands of diversities exist under same umbrella

Demands of diversities that exist under same umbrella. Write down these diversities and how do they fit into mainstream movement? Write down ways to bring these diversities into more visible space?"

  Leadership affect ethical environment within organization

How does leadership affect the ethical environment within an organization? What role do you think the personal morals of a CEO plays in the handling of an organization's ethical problems?

  Harold was the newest employee at the construction site

Assuming that the court and jury (if there is one) believes that the facts are sufficiently compelling to constitute harassment, Harold will win his sexual harassment suit.The fact that his harassers are the same sex is not an issue.

  Contemporary management theory

What other historical management theories were affected by this "first step" looking at the need to assess human motivation and behavior? Through research, relate your answer to one contemporary management theory.

  Critical article review

Critical Article Review,  omment on the strengths and weaknesses of the paper.  Did the authors acknowledge limitations to their work?  Was the analytic horizon appropriate?  Did their approach bias their results?

  Abnormally dangerous activities liability

Persons who engage in abnormally dangerous activities such as crop dusting or blasting: Are liable only if all the elements of negligence are proven against them.

  Control theories believe that everyone could commit crimes

Control theories believe that everyone could commit crimes, however it depends on the control that is on us to determine whether or not we do. Give you opinion on control theories and whether or not you agree with them.

  Growth of negative schemas and cbt

Why CBT is utilized for less severe disorders in which the client can simply access the precocious with the help of therapist.

  References to death present in the novel

Can you describe the passages of the novel where the differences between the South and the North are more evident? Can you remember the different images / references to death present in the novel? What do they mean?

  Double-sheaved pulley

Solution two transmission belts pass over double-sheaved pulley that is attached to an axle supported by bearnings at A and D. The radius of the inner sheave is 125mm and the radius of the outer sheave is 250 mm. Knowing that when the system is at re..

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