d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Fg For Whoever Does This For Me > Basic C++
123Next
Add Reply New Topic New Poll
Member
Posts: 4,332
Joined: Mar 31 2011
Gold: 71.00
Jun 4 2012 07:34pm
Write a program that maintains a seating chart. There are 6 rows and 3 columns. Set up a 2 dimensioned array to hold the names of the people assigned seats. Put underscores in empty seats. The program will be menu driven with the ability to add someone to the seating chart, delete someone from the seating chart, display the seating chart and quit the program. If you are adding someone to the seating chart, prompt from the person's name and row and column numbers. Verify that they are within the correct range. If there is already someone assigned to that seat, display an error message; otherwise, add the person's name to the seat and display a confirmation message. If you are deleting someone from a seat, prompt for the row and column numbers. Verify that they are within the correct range. If there is no one assigned to that seat, display an error message; otherwise, remove the person's name from the seat and display a confirmation message. If the user doesn't enter a valid menu option, display an error message. Use the following functions in your program: DisplayMenu, AddPerson, DeletePerson and DisplaySeatingChart.

Output from Program:
SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 3

S E A T I N G C H A R T

____________________ ____________________ ____________________

____________________ ____________________ ____________________

____________________ ____________________ ____________________

____________________ ____________________ ____________________

____________________ ____________________ ____________________

____________________ ____________________ ____________________


SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 1
Enter person's name: Backus, Daryl
Enter row: 3
Enter column: 3
Backus, Daryl was added to the seating chart.

SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 1
Enter person's name: Evans, Joshua
Enter row: 1
Enter column: 2
Evans, Joshua was added to the seating chart.

SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 1
Enter person's name: Jackson, Joseph
Enter row: 5
Enter column: 3
Jackson, Joseph was added to the seating chart.

SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 1
Enter person's name: Merchant, Taylor
Enter row: 4
Enter column: 2
Merchant, Taylor was added to the seating chart.

SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 3

S E A T I N G C H A R T

____________________ Evans, Joshua ____________________

____________________ ____________________ ____________________

____________________ ____________________ Backus, Daryl

____________________ Merchant, Taylor ____________________

____________________ ____________________ Jackson, Joseph

____________________ ____________________ ____________________


SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 1
Enter person's name: Pace, Bryce
Enter row: 2
Enter column: 1
Pace, Bryce was added to the seating chart.

SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 1
Enter person's name: Rollins, Casey
Enter row: 8
Invalid row - please re-enter
Enter row: 0
Invalid row - please re-enter
Enter row: 2
Enter column: 0
Invalid column - please re-enter
Enter column: 9
Invalid column - please re-enter
Enter column: 1
Someone is already in that seat.

SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 3

S E A T I N G C H A R T

____________________ Evans, Joshua ____________________

Pace, Bryce ____________________ ____________________

____________________ ____________________ Backus, Daryl

____________________ Merchant, Taylor ____________________

____________________ ____________________ Jackson, Joseph

____________________ ____________________ ____________________


SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 2
Enter row: 12
Invalid row - please re-enter
Enter row: 3
Enter column: 5
Invalid column - please re-enter
Enter column: 1
No one was assigned that seat.

SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 2
Enter row: 1
Enter column: 2
Evans, Joshua was removed from the seat.

SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: 3

S E A T I N G C H A R T

____________________ ____________________ ____________________

Pace, Bryce ____________________ ____________________

____________________ ____________________ Backus, Daryl

____________________ Merchant, Taylor ____________________

____________________ ____________________ Jackson, Joseph

____________________ ____________________ ____________________



SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: d
Invalid Menu Option

SEATING CHART MENU
1 - Add Person to Chart
2 - Delete Person from Chart
3 - Display Seating Chart
Q - Quit
Enter Choice: q
Press any key to continue . . .


50 FG for anyone who does this for me.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 4 2012 08:03pm
50 fg is really low

This post was edited by carteblanche on Jun 4 2012 08:03pm
Member
Posts: 2,303
Joined: Oct 11 2007
Gold: 0.00
Jun 4 2012 08:29pm
would be done within an hour in C#... don't know much bout c++ though
Member
Posts: 4,332
Joined: Mar 31 2011
Gold: 71.00
Jun 4 2012 10:41pm
anyone else? 100 fg if u can do it in an hours or less...
i know it's simple, i just dont have the time right now
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jun 5 2012 12:05am
c++ or c?
Member
Posts: 4,332
Joined: Mar 31 2011
Gold: 71.00
Jun 5 2012 12:59am
Quote (AbDuCt @ Jun 5 2012 01:05am)
c++ or c?


C++
Member
Posts: 2,429
Joined: Jul 22 2010
Gold: 104.60
Jun 5 2012 06:58am
100 fg are around 7$ :bonk:
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jun 5 2012 10:39am
Quote (stecman @ Jun 5 2012 08:58am)
100 fg are around 7$  :bonk:


i would of done it for 100fg but they want it in C++ lol. even though there isnt a difference between the two for this project besides using cin/cout i just simply refuse to type it lol.
Member
Posts: 9,803
Joined: Jun 28 2005
Gold: 6.67
Jun 5 2012 11:27am
Nobody forces you to use cin and cout in C++.
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jun 5 2012 11:42am
Quote (KrzaQ2 @ Jun 5 2012 01:27pm)
Nobody forces you to use cin and cout in C++.


but they would most likely get in trouble seeing how they would be using their C equivalents.
Go Back To Programming & Development Topic List
123Next
Add Reply New Topic New Poll