Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Switch Statements and Sentinel-Controlled Looping

807599Nov 9 2006 — edited Nov 9 2006
I have to write an app that reads an application for a mail-order house that sells 5 products as follows. Product 1: $2.98, product 2: $4.50, product 3: $9.98, product 4: $4.49 and product 5: $6.87. It should read a series of pairs of numbers as follows a) product number and b) quantity sold.

I need to use a switch statement to determine the retail price for each product. It should calculate and display the total retail value of all products sold. I have to use a sentinel controlled loop to determine when the program should stop looping and display the final results.

I am completely lost with this project. I would be ever so grateful if someone could get me started!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2006
Added on Nov 9 2006
7 comments
453 views