Earn Higher Grades With Instant Assignment Help.Ask Question!

C++ Programming
(5/5)

Read the seats prices into a 2D dynamic array. The seat prices are stored in a text file ‘prices.txt’. User double pointer for the prices array.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Summative 2020

To raise money for the homeless shelter in their community, School Without Walls, Class of 2020 is selling tickets for a play at their school. The play will take place in the school auditiorium. The rows in auditoriam are numbered from 0 to 14. There is 15 row of seats. Each odd # row has 15 seats and each even # row has 20 seats. See the figure below for the seating chart.

 

0

1

2

3

4

5

6

7

8

9

0

1

2

3

4

5

6

7

8

9

Row0

X

#

X

#

X

#

X

#

X

#

X

#

X

X

X

X

X

X

X

X

Row1

X

#

X

#

X

#

X

#

X

#

X

#

X

X

X

 

 

 

 

 

Row2

X

#

X

#

X

#

X

#

X

#

X

#

X

X

X

X

X

X

X

X

Row3

X

#

X

#

X

#

X

#

X

#

X

#

X

X

X

 

 

 

 

 

Row4

X

#

X

#

X

#

X

#

#

#

#

#

#

#

#

#

X

X

X

X

Row5

X

#

#

#

#

#

#

#

#

#

#

#

#

#

#

 

 

 

 

 

Row6

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

Row7

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

 

 

 

 

 

Row8

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

Row9

#

#

X

#

X

#

X

#

X

#

X

#

X

X

X

 

 

 

 

 

Row10

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

Row11

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

 

 

 

 

 

Row12

X

#

X

#

X

#

X

#

X

#

X

#

X

X

X

X

X

X

X

X

Row13

X

#

X

#

X

#

X

#

X

#

X

#

X

X

X

 

 

 

 

 

Row14

X

#

X

#

X

#

X

#

X

#

X

#

X

X

X

X

X

X

X

X


Seates that are represented by an ‘X’ are taken and available seats are represente by ‘#’.

Design and implement a program that will perform the following tasks.

  1. Read the seats prices into a 2D dynamic array. The seat prices are stored in a text file ‘prices.txt’. User double pointer for the prices array.
  2. Display a seating chart. The seating chart is stored in a text file ‘seat.txt’.
  3. Prompt the user to input:
  • Input the row number
  • Input the seat number

Display the ticket price

Update the seating chart.

  1. Display the dollar amount from all tickets sold.
  2. Display the number of seats sold
  3. Display the number of available seats

Input Validation:

  1. Do not accept row number of seat number that do not exist
  2. Check seat availability before sale.

 

Attachments:
(5/5)

Expert's Answer

16 Times Downloaded

Related Questions

CSI 1420 Introduction to C Programming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu

The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

16 Times Downloads

Ask This Assignment To Be Done By Our ExpertsGet A+ Grade Solution Guaranteed

expert
joyComputer science
(4/5)
12 Answers Hire Me
expert
Robert DLaw
(4.8/5)
655 Answers Hire Me
expert
Dr Samuel BarberaStatistics
(5/5)
935 Answers Hire Me
expert
Tutor For YouEconomics
(5/5)
676 Answers Hire Me