Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: HELPP!!!!!!!

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HELPP!!!!!!!

    An array meals contains five elements corresponding to the meal codes 0 through 4 in Lab 6.2. For example, element meals[ 1 ] contains the number of "Chicken-based adult" meals requested, meals[ 4 ] contains the number of "Burger child" meals, and so on. Element meals[ 0 ] contains the number of requests in which none of the conditions for a particular meal type was met.

    Write code to store in the double cost the cost to the airline of providing the meals, where the cost for a meal of each type is specified in the table below. The number of meals in meals[ 0 ] should be split equally between "Chicken-based adult" and "Beef-based adult". If this number is not an even number, then the number allocated to "Chicken-based adult" should be one more than the number allocated to "Beef-based adult".
    Meal Code Meal Cost
    1 $1.75
    2 $2.08
    3 $2.14
    4 $0.98
    int[] meals = { };
    double cost;


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: HELPP!!!!!!!

    Welcome to the forums. There's no reason to shout. You should first start off by answering the following question: What have you tried?

Similar Threads

  1. Linked Lists Java Programming HELPP P.S. I am a beginner in Java Programming
    By judemartin99 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 20th, 2013, 02:19 PM
  2. HELPP!!!! - Java validation with nested loops
    By shinju in forum Loops & Control Statements
    Replies: 2
    Last Post: October 16th, 2012, 11:56 AM
  3. Ready To Program Helpp!!!!!!!
    By valavan in forum Java IDEs
    Replies: 1
    Last Post: October 3rd, 2012, 09:55 PM
  4. helpp MEEE!!
    By yug in forum Android Development
    Replies: 2
    Last Post: August 30th, 2012, 02:13 PM
  5. Object Oriented Programming request please helpp...
    By dini-x in forum Object Oriented Programming
    Replies: 3
    Last Post: April 1st, 2010, 12:57 AM