Path: news.mathworks.com!not-for-mail
From: "Ali " <doc_toc29@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: I'm still new in using matlab.... can't anyone help me...
Date: Mon, 6 Apr 2009 08:59:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <grcg8l$70$1@fred.mathworks.com>
Reply-To: "Ali " <doc_toc29@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1239008341 224 172.30.248.37 (6 Apr 2009 08:59:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 6 Apr 2009 08:59:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1790212
Xref: news.mathworks.com comp.soft-sys.matlab:530639


A small bus company has just purchased a computer for its new automated reservations system.The owner of the company has asked you to program the new system.You are to write a program to assign seats on each bus with capacity of 40 seats.You program should display the following menu of alternatives.

Please type 1 for &#8220;VIP seat&#8221;
Please type 2 for &#8220;economy seat&#8217;

If the person types 1,then your program should assign a VIP seat section (seat 1-26).If the person types 2,then your program should assign a seat in the economy section(seat 27-40).Your program should then print a ticket including the passenger seat class and the seat number on the same ticket.

Use a single-subscripted array to represent the seating chart of the bus.Initialize all the elements of the array to 0 to indicate that all seats are empty.As each seat is assigned,set the corresponding elements of the array to 1 indicate that the seat is no longer available.


Your program should never assign a seat that has already been assigned.Your program also has to show the message &#8220;VIP seat SOLD OUT&#8221; if seat in VIP class is full and the message &#8220;economy seat SOLD OUT&#8221; if seat in economy class is full.

my friend and I have try answered the question above,but our lecturer said that our programming is wrong..please...please help us..