Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q3. Write a Java program for an online retailer that would look like the following during execution: [04 Marks] For your information: The online retailer

image text in transcribed

image text in transcribed

Q3. Write a Java program for an online retailer that would look like the following during execution: [04 Marks] For your information: The online retailer sells only five products with fixed prices as follows: In order to get full mark on this question you have to make sure to do the following: A. Write a Java application using Eclipse that do the following: 1. Request from the user to input the Product ID (i.e 1,2,3,4 or 5). 2. Request from the user to input the Product Quantity. 3. Use switch-case statement to calculate the total (i.e. total = total + product price * product quantity). 4. Your program shall run forever until the user input zero for product ID using do-while statement. B. Attach to your answers the source code. C. Attach to your answers an example run of the program (print screen of outputs). Q5. Write a Java program to enter the numbers till the user wants and at the end the program should display the largest and smallest numbers entered [04 Marks] xan= Enter the number 5 Enter the number 2 Do you want to continue Y ? Y Enter the number 10 Do you want to continue y?n Largest number =10 Smallest number =2

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

Students also viewed these Databases questions

Question

How do rapid growth firms deal with potential cash flow shortfalls?

Answered: 1 week ago

Question

1. Which position would you take?

Answered: 1 week ago