Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The program should be in Java PART 2 Problem #1: (35 pts Write a program that reads from the user the item type (A, B

image text in transcribed

The program should be in Java

PART 2 Problem #1: (35 pts Write a program that reads from the user the item type (A, B or C) and the quantity bought. The price of each item is displayed in the below table. If the user has bought more than 5 items of any type, he/she is notified that he/she will be charged double the amount; the user is given the choice to accept or to reduce the quantity bought to 5. The program displays the total amount. Your program should accept lowercase and uppercase alphabets for all character inputs. Type Price per one Item in LL 3000 B 4000 5000 Sample Run 1: Enter type of item bought and the quantity: A 3 Your total is: 9000.OLL Sample Run 2: Enter type of item bought and the quantity: A 7 You exceeded the limit. You will be charged double the price. Enter y to accept and continue or n to reduce the quantity to 5: Y Your total is: 42000.OLL Sample Run 3: Enter type of item bought and the quantity: 6 You exceeded the limit. You will be charged double the price. 3/4 Enter y to accept and continue or n to reduce the quantity to 5: Your total is: 20000.OLL Sample Run 4: Enter type of item bought and the quantity: D 4 Invalid Input

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions

Question

6. Explain how to train managers to coach employees.

Answered: 1 week ago

Question

5. Tell how job experiences can be used for skill development.

Answered: 1 week ago

Question

4. Explain the characteristics of successful mentoring programs.

Answered: 1 week ago