Hi,
I have to develop a C++ programme for airplane booking company where I have a one plane and 42 seats in the plane
There are 1st class and 2nd class and somking and nonsmoking areas.
this is a assignment I have to do.
I dont need any code but I want to discuss about the background of the programme and start the coding.
problem is I want to know what is the best data storing mechanism for the seat booking in the programme.
I think it is useless to go for database connecting instead using some data stuctures.
please be king enought give me a hint.
thanks in advance,
menukadevinda
7 Replies - 1947 Views - Last Post: 09 January 2012 - 07:11 PM
#1
assigning seats for a commercial plane + suitable data storing meachan
Posted 24 December 2011 - 12:46 AM
Replies To: assigning seats for a commercial plane + suitable data storing meachan
#2
Re: assigning seats for a commercial plane + suitable data storing meachan
Posted 24 December 2011 - 01:20 AM
If I were you I would use a class called seat and make a linked list.
#3
Re: assigning seats for a commercial plane + suitable data storing meachan
Posted 24 December 2011 - 02:03 AM
can you explain bit more . reasoning is nice then I can do this with a better understanding
thx
thx
#4
Re: assigning seats for a commercial plane + suitable data storing meachan
Posted 24 December 2011 - 02:15 AM
Well Insertion and deletion are quite easy and you have as much space as you can possibly want. Within the class you can either have bool of first class second class etc. or maybe even use a int to set the class for example use 1 for 1st class, 2 for 2nd class and you can have a bool for smoking allowed or not. If you have a class or a structure you can have many multiple instance of the pointer pointing to a particular plane so you can have multiple planes.
#5
Re: assigning seats for a commercial plane + suitable data storing meachan
Posted 24 December 2011 - 02:29 AM
first I want to thank you for the reply.
Here is what I feel, in the assignment they havent tell multiple planes but one plane. Therefore, I think this can be done very easily with a multidimentional array. If a customer select a seat we can set a letter to that seat then we can select rest of the balance seats. appart from that we dont have to delete customers just change the seat is given number.
therefore, I think this can be done very simply.
what do we think about my idea.
thanks.
Here is what I feel, in the assignment they havent tell multiple planes but one plane. Therefore, I think this can be done very easily with a multidimentional array. If a customer select a seat we can set a letter to that seat then we can select rest of the balance seats. appart from that we dont have to delete customers just change the seat is given number.
therefore, I think this can be done very simply.
what do we think about my idea.
thanks.
#6
Re: assigning seats for a commercial plane + suitable data storing meachan
Posted 24 December 2011 - 06:32 AM
This is your assignment, there are quite a few different ways to accomplish this, so try your method. If you have problems then post the code causing the problems and ask specific questions about the posted code.
Jim
Jim
#7
Re: assigning seats for a commercial plane + suitable data storing meachan
Posted 08 January 2012 - 11:32 PM
sry , I hae to remove this. since it is school assignment. I wil publish this later.
This post has been edited by menukadevinda: 09 January 2012 - 01:38 AM
#8
Re: assigning seats for a commercial plane + suitable data storing meachan
Posted 09 January 2012 - 07:11 PM
If you can't ask for help online, don't post your code at all. However, once you post something relevant to the topic, don't remove it. I've gone ahead and removed your editing ability because of this.
Topic closed.
Topic closed.
Page 1 of 1
|
|

New Topic/Question
This topic is locked



MultiQuote







|