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: Java Assignment 2011 - reservation

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Posts
    3
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Java Assignment 2011 - reservation

    Can some one look at this for me. I am using bluej.
    Thanks in advance ...

    Write a program that will read the number of rows and columns of seats on a certain plane, and accept reservations for a certain flight on that plane. Use a two-dimensional array or vector to represent rows and columns in the plane.

    Write a program that will read the number of rows and columns of seats on a certain plane, and accept reservations for a certain flight on that plane. The plane might have economic, business and first class sections.

    Your program should do the following:
    1. Prompt for and read the number of rows of seats on the plane (integer).
    2. Prompt for and read the number of columns of seats on the plane (integer).
    3. If number of rows or number of columns is zero or negative print:
    Values must be positive ! and exit the program. (Catching Errors)
    4. Read the number of rows in the economic section of the plane (integer). Note that the economic will always be at the rear of the plane.
    5. If '0' is entered, then the person is in the first class section of the plane.
    6. Display the following menu :
    Make a reservation first class (f/F).
    Make a reservation business class (b/B).
    Make a reservation economic class (e/E).
    Quit (q/Q).
    Please select an option :

    1. Read user's choice and proceed as follows: When seats are reserved in a section and if there is one available, print the number of the seat reserved (row number and columns number).




    Reserving seat economic - row: 21 column: 01
    If all seats in the economic section are reserved, print:
    No more economic seats available.
    Then display the menu again and prompt for another choice.

    2. If user's choice is 'q' or 'Q':
    Print:
    Total number of seats.
    Total number of seats reserved.
    Number of seats reserved in the first class section.
    Number of seats reserved in the business class section.
    Number of seats reserved in the Economic class section.

    3. If user enters any other choice:
    Print:
    Invalid choice !
    Then display the menu again and prompt for the next choice.
    Your program should, of course, never assign a seat that has already been assigned.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,262
    Thanks
    176
    Thanked 820 Times in 763 Posts
    Blog Entries
    5

    Default Re: Java Assignment 2011 - reservation

    It helps to post exactly what you have done so far and where you are stuck, preferable breaking the problem(s) down into short pieces of code we can address one by one, as well as posting any and all compile errors or exceptions

  3. #3
    Junior Member
    Join Date
    Mar 2011
    Posts
    3
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Java Assignment 2011 - reservation

    i am trying to learn the program. I have been create various aspect like modules.
    Last edited by bs09it; March 2nd, 2011 at 08:51 AM.

Similar Threads

  1. ROBOTIX 2011:Robotics competition in India
    By roobokgp in forum The Cafe
    Replies: 2
    Last Post: November 21st, 2013, 05:21 AM
  2. Java Tip Jan 22, 2011 - Primality Tests
    By helloworld922 in forum Java Programming Tutorials
    Replies: 2
    Last Post: April 18th, 2011, 08:16 PM
  3. IIT ROORKEE & COGNIZANCE-2011(11-13th March)
    By atul786 in forum The Cafe
    Replies: 0
    Last Post: January 27th, 2011, 09:57 AM
  4. my java assignment -- please help
    By java_beginner in forum Java Theory & Questions
    Replies: 6
    Last Post: May 20th, 2010, 08:32 AM
  5. Replies: 1
    Last Post: February 22nd, 2010, 07:20 AM

Tags for this Thread