Thread: What do i need ? Help needed

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    10

    What do i need ? Help needed

    Hi, i recently started studying programming.


    So, I've been assigned this new project.

    'A program to handle the reservations of an airline's flight.

    Considering the planes have the following characteristics:

    - Vip area: 5 rows and 4 Columns A,B,C,D
    -Smoking area: 10 rows 6 colums A,B,C,D,E,F
    -Non-smoking 10 x 6 A,B,C,D,E,F

    The program must be able to store the information of each passenger, including name, ID,gender, age. It must also alert you when seats are taken, a complete area is full, or the airplane is full.

    It must also have a menu with these options: Reserve a seat, remove a reservation, consulting a reservation, and seats on every area [taken and not taken]

    --------------------------------------------------


    The problem is.... I have no idea what i need to start!

    I don't want you to give me code. Maybe it could help , but only if you need it to explain something to me, cause i want to do this.

    I just need you to tell me what do i need to use for every part of the program, i can then google the methods, the functions, whatever, and learn em and apply em.

    I suck haha ^^ all of ur ideas are welcome

    I have to use structures for the passengers right? But , what do i need to make the seats? and the areas? i have NO idea. How do I make it so that it checks that its taken or not? T_T *desperate*

  2. #2
    Registered User
    Join Date
    Jul 2010
    Posts
    26
    But , what do i need to make the seats? and the areas?
    A class with 2D bool arrays to represent the areas perhaps. I would initialize all elements (seats) of the arrays to 0 and set them to 1 one-by-one as the seats are reserved to indicate they've been taken.

    Code:
    class Seats
    {
        bool vip[5][4];
        bool smoking[10][6];
        bool nsmoking[10][6];
        public:
            //Constructor and other functions
    }

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    If you have no idea where to start, aren't you jumping the gun, so to speak?
    Let's start off small. You need to store information about passengers, right? How do we store information? What type of variables might we need? Do you think you can figure that out?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    I have to use structures for the passengers right? But , what do i need to make the seats? and the areas? i have NO idea. How do I make it so that it checks that its taken or not? T_T *desperate*
    How can you have "NO" idea??? what are you doing being given exercises at this level if you cannot begin to imagine the kinds of data structures / types, program flow elements that you will need to use in order to pass the test??
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  5. #5
    Registered User
    Join Date
    Feb 2009
    Posts
    329
    Quote Originally Posted by rogster001 View Post
    How can you have "NO" idea??? what are you doing being given exercises at this level if you cannot begin to imagine the kinds of data structures / types, program flow elements that you will need to use in order to pass the test??
    My guiess is that he's not paid attention in class this year!

  6. #6
    Registered User
    Join Date
    Jul 2010
    Posts
    10
    So... the ideas i have are... [ pardon my newbie explanation ]

    Ok so... a switch to make the main menu

    "Reserve a seat, remove a reservation, consulting a reservation, and seats on every area [taken and not taken"


    qwertyluker game me the idea for the seats, i don't really know how to work with classes, i'll google that out.

    A struct for the passengers, containing name, id, age, gender.

    But.. how do i link the passengers to the seats? like... If "X seat" is taken make this array "1"

    I will have to google some more, cause apparently i have to make a structure for every passenger? sigh.. i suck lol

  7. #7
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472

    bums on seats

    just have a bool isBooked for example as a class member, when you instansiate it declare an array of passenger objects, then reference them in the normal way
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. free needed or not?
    By quantt in forum Linux Programming
    Replies: 3
    Last Post: 06-25-2009, 09:32 AM
  2. C Programmers needed for Direct Hire positions
    By canefan in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 09-24-2008, 11:55 AM
  3. Battleship Game (Win32 EXP Needed)
    By ElWhapo in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 01-15-2005, 10:10 PM
  4. C++ help needed
    By Enkindu in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 08-31-2004, 11:24 PM
  5. Poll: Is pseudocode really needed ?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 29
    Last Post: 02-28-2002, 06:33 PM