RSS Forums RSS
Please support our VB.NET advertiser: Programming Forums
Views: 1028 | Replies: 1
Reply
Join Date: Apr 2007
Posts: 1
Reputation: nicho is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nicho nicho is offline Offline
Newbie Poster

Help what help on my pseudocode

  #1  
Apr 12th, 2007
I have started training in writing algorithms. I get forums and answer. but I want cleririty on the pseudocode I have writing.
The questions asks to write a pogram which will assign seats in a flight(capacity of 10 seats).my program should include;first class and economy class-assigning seats 1 to 5 and 6 to 10, for First class and economy class respectively.
-A bording pass should be printed indicating seat number, class type.
-Also if First class is full, the program should provide options for Economy class and viseversa. But a seat should not be assigned after it has been assigned.
-If yes then assign seats approprietly Else If no print "Next Flight leaves in five hours".

My Algorithms in Pseudocode.

SET FirstClass=o
SET Economy (will recieve yours thaks)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2006
Posts: 4
Reputation: evilfruitsmashe is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
evilfruitsmashe's Avatar
evilfruitsmashe evilfruitsmashe is offline Offline
Newbie Poster

Re: what help on my pseudocode

  #2  
Apr 14th, 2007
Are you just trying to create the pseudocode or an actual program? What I would do is create a size 10 array to cover your seats, the values of each of the items in the array are all set to 1 to begin with, meaning that there are all open seats. The values are changed to 0 if the seat is assigned to someone. Then simple looping will take care of finding out if there are available seats and if you need to recommend seating in the other area of the plane. Also, if all values in the array are 0 then you can have it print "Next flight leaves in five hours."
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:49 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC