Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C#, write an application to sell tickets to an event. There are 8 rows in our small event center. Rows 1 and 2 are

In C#, write an application to sell tickets to an event. There are 8 rows in our small event center. Rows 1 and 2 are considered VIP seats and sell for $450 each. Seats in rows 3 and 4 are sold for $350 each. Seats in rows 5, 6, and 7 are $300. Seats in row 8 are $250.

The application is simplified and assumes the seats are always available. You should prompt the user for the number of seats they would like to purchase. If the user enters 0 or less or more than 12, you should display an error message to the user.

Then prompt the user for the row number for their seats. If the user enters a row less than 1 or greater than 8, display an error message to the user.

Determine the price per ticket based on the user entered row, then determine the tickets sum by multiplying the number of seats by the price per ticket.

Ask the user if he/she would like to charge the tickets to their credit card. If the answer is y,Y,Yes,YEs, or YES then add a $5.00 fee for credit card processing to the total cost.

Ask the user if he/she would like to have their tickets delivered. If the user answers y,Y,Yes,YEs, or YES then add an $8 delivery charge to the total cost.

Finally, the application should display the ticket cost, then the credit card processing cost, then the delivery cost, then the total of all costs.

Additonal Notes:

1. Variables are declared / defined correctly (data type and name) to hold user input for

- Number of tickets or seats

- Row number

2. Constants is defined for the ticket prices.

The constant name is in ALL CAPS and is initialized to the correct values

The constants are used in calculations

3. Correctly perform the following:

- Prompt the user for the number of tickets

- Read the number of tickets

- Convert the number of tickets into the correct data type

4. Correctly perform the following:

- Prompt for the row number

- Read in the row number

- Convert the row number to the correct data type

5. Use IF statements to correctly calculate the Ticket Cost based on the chosen row and number of tickets

6. Ask the user if he/she would like to charge the ticket cost to their credit card. If the answer is y,Y, yes, Yes,YEs,yeS or YES then add a $5.00 fee for credit card processing to the total cost.

7. Correctly ask the user if he/she would like to have their tickets delivered. If the user answers y,Y,Yes,YEs, yeS or YES then add an $8 delivery charge to the total cost.

8. Display the ticket cost, then the credit card processing cost, then the delivery cost, then the total of all costs in currency format

9. Every single line of code that was written has its own unique comment written above it (i.e. there is a one to one correspondence of comments to code.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions