Homework help please!
Hello there! I need some quick help please. I need to write two different java programs and I'm having a difficult time figuring them out. I tried referring to my school textbook but I still don't quite understand. Help is greatly appreciated!
Java Program 1:
Write an application that prompts the user to make a choice for a pizza size -S, M, L, or X -and then displays the price as $6.99, $8.99, $12.50, or $15.00, accordingly. Display an error message if the user enters an invalid pizza size. Save the file as PizzaChoice.java.
Java Program 2:
Create an application containing an array that stores 20 prices, such as $2.34, $7.89, $1.34, and so on. The application should (1) display the sum of all prices, (2) display all values less than $5.00, (3) calculate the average of the prices, and (4) display all values that are higher than the calculated average value. Save the file as Prices.java.
If anyone can help, I will greatly appreciate it!!
Please have a look at forum rule #1.5.
This forum is not a free coding service. As a general rule, the people helping out in this forum don't write code for others (especially code that appears to be for homework), but try to help with fixing code that doesn't work. You may perhaps get someone to write this script for you, but you'll be far more likely to get help if you have made a substantial effort and written some code yourself. Then someone here will almost certainly help you correct/improve your work.
Quizmaster: Name a character from any one of these four plays - Othello, Macbeth, Coriolanus and Hamlet, who has a speaking part.
|All times are GMT +1. The time now is 07:44 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.