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

  Different approaches to constitutional interpretation

Which approach best characterizes Justice Stevens' opinion of the Court in U.S. Term Limits, Inc. v. Thornton (1995)? Explain.Which approach best characterizes Justice Thomas's dissent in the same case? Explain.

  Physical growth and development during middle childhood

Describe normal physical growth and development during middle childhood, and account for the usual variations among children.

  Establishing security and control.

Establishing security and control. Be sure to specifically address considerations for assessing the possible exposure to biological or chemical toxins.

  Explain pros and cons of enforceability applying knowledge

Explain pros and cons of enforceability applying knowledge you have obtained from course. Particularly apply managed care and contract law concepts and principles to fact pattern.

  Most common cognitive changes

Critically discuss five of the most common cognitive changes that happen as we age. Can they be manipulated in any way to prolong favorable out comes?

  What are some reason as to why there are still managers

More and more leaders are enabling employees to accomplish more by empowering them to accomplish the tasks that are set in front of them.

  Star dust and nuclear waste-planetary system

It has been said by artists ans scientists, "We are star dust" and "We are nuclear waste". Discuss each quote in terms of the evolution of a star and its planetary system from a molecular gas cloud and the source of that cloud.

  Good theatre fortifies-controlled therapeutic way

Who said "good theatre fortifies us because it allows us to release repressed emotions in a controlled therapeutic way"?

  Cognitive psychology and milestones

Do you think that the cognitive psychology is a tool to that understanding? How so?

  Online shopping and e-commerce transactions

Online Shopping and E-Commerce Transactions. Learn as much as you can about these topics and share your own personal experiences in your discussion.

  Elements of hinduism-confucianism and buddhism

Given the classification of Hinduism, Confucianism, and Buddhism as world religions in Eastern culture, can you help me to identify the primary elements of each religion and identify the elements that they have in common which render them "Eastern..

  Right to believe

Does everyone have a right to believe what one wants? The answer would be yes but a qualified "yes".

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