Show Bid Request
Homework problem on a appolication of a 2-dimensional array to assign seats to passengers on a plane.
Bid Request Id: 4283
|
|
|
Posted by: |
fuzzyd97 (9 ratings)
(Software buyer rating 9.88)
|
Non-action Ratio: |
Very Good - 0.00%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Oct 29, 2001 7:37:21 PM EDT
|
Bidding Closes: |
Oct 30, 2001 8:30:42 PM EDT
|
Viewed (by coders): |
451 times
|
|
|
|
Description:
The plane has seven rows,with fours seats per row. The following is the seating configuration. Row numbers are from 1 o 7 and the seating planning is AB CD for each row. Notice that the rows are labeled 1 to 7 on the plane but must be labeled 0 to 6 in the array. The columns are listed as seats 'A','B','C','D' but are also labeled as 0 to 4 in the array. You will have to make thhese adjustments yourself when you define and initialize the array that stores the seating plan. To start, declare the seating plan to be 2-dimensional char array as char Seating [7][4]; Fill this array so that the four rows is the same namely 'A''B''C''D' THIS WILL give the display above. Theprogram proceeds by allowing potential passengers to select the seat they wish to have.
When a seat has been slected its place on the array will be replaced by the letter 'X' So, if seats 1A 1B 2C ADN 3D have been sold, then the array will display those rows with a X LIKE THIS XX CD AB XD AB CX AB CD AB CD AB CD AB CD IF a passenger requests a seat that is already taken, the request is rejected and that passenger will be asked to select another seat.
Some requirements: void InitSeats (char S [][4], int rows) This is for the four seats are labeled ABCD
void Display (char S [][4],int rows)
This if for the rows to be displayed in a readable format
bool SeatAssigned (char S[][4],int row,char seat)
This is for s holds the seating plan row is the row in which seating is requested (1-7 -> convert to 0-7) seat in row requested A-D must be converted to 0-3.
The program should begin by decalring and initializing a two dimensionsal array to hold the seating plan. THen, creat a loop that:
1. Displays the current seating plan
2. Asks the user to submit the row (1-7) desired
3. Asks for the seat desired in that row (A,B,C,D)
4. If the seast is avaible, the passenger is placed by replacing the array entry by an 'X'. If the seat is unavailble, ask the passenger to submit another choice.
This loop should repeat until either the plane is full or the user opts to stop, The final seating plan should then be displayed ask before the program terminates.
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Special Conditions / Other:
Must be done by 01:30 am 10/31/01.
Additional Files:
This bid request includes IMPORTANT additional attached files. Please download and read fully before bidding.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$10 (USD)
|
Oct 30, 2001 2:38:28 AM EDT
|
9.53
(Excellent)
|
|
|
I've got your program done... I'll give you the source code after the auction is over and change anything you want to change. Thanks. |
|
Attached File
|
|
|
|
|