Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help needed writing two java programs!

    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!!

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    You will receive quicker help if you post in the correct forum: Java and JavaScript are two completely different languages.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #3
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm sorry! I've posted now in the correct section. My apologies again, thanks!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •