7 Replies - 4618 Views - Last Post: 09 January 2012 - 07:11 PM Rate Topic: -----

#1 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

assigning seats for a commercial plane + suitable data storing meachan

Posted 24 December 2011 - 12:46 AM

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

Is This A Good Question/Topic? 1
  • +

Replies To: assigning seats for a commercial plane + suitable data storing meachan

#2 ssharma286  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 93
  • Joined: 04-December 10

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.
Was This Post Helpful? 1
  • +
  • -

#3 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

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
Was This Post Helpful? 0
  • +
  • -

#4 ssharma286  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 93
  • Joined: 04-December 10

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.
Was This Post Helpful? 1
  • +
  • -

#5 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

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.
Was This Post Helpful? 0
  • +
  • -

#6 jimblumberg  Icon User is online

  • member icon


Reputation: 4232
  • View blog
  • Posts: 13,293
  • Joined: 25-December 09

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
Was This Post Helpful? 2
  • +
  • -

#7 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

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

Was This Post Helpful? -3
  • +
  • -

#8 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10781
  • View blog
  • Posts: 40,153
  • Joined: 27-December 08

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.
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1