I have a final assignement for C++ intro to programming class, I have to pass the class in order to graduate next month. The class was all online, and I didn't learn much. This is only the second project we had to do. I've done another project before but it was really simple which was a restaurant menu. This project is for a concert seat location, and I don't exactly understand what the instructor wants. I've done the program, but it's exactly what the task is. My program basically asks for the number of seats for each location, and at the end it adds them all up. I am pretty sure I have to do more, I am even settling for a partial grade, I just don't want to fail the class. The main problem I am having is understanding what the task is exactly, especially for the "None" part. This is the task:
"Create a flowchart that, given seat locations at a concert and the number of seats requested, displays the price of a concert ticket as well as the total price of the tickets based on the number of tickets ordered. Once all orders have been placed, a final total of the number of tickets and the total receipts should be displayed.
This process should continue as long as there are persons to order tickets which means until the location is 'N' for none. If the user enters any other seat location, the program should display the message “Invalid location”.
Include appropriate prompt messages, internal documentation, and at the end a total of the number of tickets ordered for each location (by location) and the total cost."
There's a section where it says: Code, Seat Location, and Price. For Code there is a B for the Seat Location Box, for the price $100, L for Lower Circle for $75, U for Upper Cirlce for $50, and N for None and the price it says No More Entries.
I am also posting my program, I would appreciate it if you guys give me some feedbacks and advince on what I should do to accomplish the task above both for the program and the flowchart.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
double numBox = 0.0;
double numLower = 0.0;
double numUpper = 0.0;
double totFeeBox = 0.0;
double totFeeLower = 0.0;
double totFeeUpper = 0.0;
double totFee = 0.0;
cout << "Number of tickets for the Box seats: ";
cin >> numBox;
cout << "Number of tickets for the Lower circle: ";
cin >> numLower;
cout << "Number of tickets for the Upper circle: ";
cin >> numUpper;
totFeeBox = numBox * 100;
totFeeLower = numLower * 75;
totFeeUpper = numUpper * 35;
totFee = totFeeBox + totFeeLower + totFeeUpper;
cout << "Total Seat Cost: " << totFee << endl;
system("pause");
return 0;
}
|