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 3 of 3

Thread: need help with an assignment

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

    Default need help with an assignment

    Objective:
    • Determine the goal and the items that are needed to achieve that goal.
    • Design solution using Step from Algorithm and Flowchart, Desk check your algorithm
    • Implementation using Java, Debug and execute


    Problem Specification:
    The owner of the ‘Lunch Café’ aims to sell daily a reasonably-priced three-course lunch to the local student community. To save costs, each day there is only a single choice of starter, main course and dessert. As with most establishments of its kind, the largest profit comes from selling the main courses. Unfortunately, the local students being frugal, hard-working and cost-conscious tend to only order a starter and/or a dessert.
    As an incentive to order main courses, the owner has decided – where customers order a main course – to provide, free of charge:
    • a soft drink if they also order a starter;
    • coffee if they also order a dessert;
    • both a soft drink and a coffee if all 3 courses are ordered.
    If customers do not order a main course or if they only order a main course, then there are no drinks provided.
    You are to write a program that advises staff what to provide. The program should ask what course(s) the customer is ordering and output what is to be provided. The choices are:
    • starter at RM3
    • main course at RM6
    • dessert at RM4
    • soft drink at RM1.5 (free only if both a starter & a main course have been ordered)
    • coffee at RM2 (free only of both a dessert & a main course have been ordered)








    Tasks to do
    1. Design solution using Step form Algorithm / flow chart. (10 marks)
    2. Desk check your algorithm with reasonable inputs (10 marks)
    3. Implementation using Java (30 marks)
    4. Debug and execute.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: need help with an assignment

    Do you have any specific questions about your assignment?
    Please post your code and any questions about problems you are having.

    What have you tried?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Feb 2013
    Location
    N. Ireland
    Posts
    29
    Thanks
    2
    Thanked 6 Times in 6 Posts

    Default Re: need help with an assignment

    Start here - Tasks to do 1. Design solution using Step form Algorithm / flow chart.

    Using Stepwise Refinement - A way of developing a computer program by first describing general functions, then breaking each function down into details which are refined in successive steps until the whole program is fully defined.

    Example of stepwise refinement :

    Set the search result to false
    Start at the beginning of the list
    For each item in the list
    if the list item matches the item we are looking for
    let the search result = true
    end -if
    end - for
    display the search result state

Similar Threads

  1. Assignment help.
    By lizartt in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 29th, 2012, 08:18 AM
  2. Assignment help
    By hws in forum Java Theory & Questions
    Replies: 1
    Last Post: December 30th, 2011, 12:14 PM
  3. assignment troubles polymorphism (guide for assignment included)
    By tdawg422 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 8th, 2011, 10:01 AM
  4. please help me in my assignment :(
    By asdfg in forum What's Wrong With My Code?
    Replies: 5
    Last Post: May 18th, 2010, 07:59 AM
  5. Replies: 1
    Last Post: February 22nd, 2010, 08:20 AM