Question: C++ Implement a constructor for the Movie struct in movie.cpp. Movie.h has been provided. movie.h # #ifndef MOVIE_H #define MOVIE_H #include #include using namespace std;
C++
Implement a constructor for the Movie struct in movie.cpp. Movie.h has been provided.
movie.h
#
#ifndef MOVIE_H
#define MOVIE_H
#include
#include
using namespace std;
struct Movie{
Movie();
string title;
double runTime;
int expectedYield;
char roomID;
int capacity;
int available;
};
#endif // MOVIE_H
The Movie struct has the following membervariables:
- string title: title of the movie, no spaces allowed
- doubleruntime: how long the movie lasts in minutes
- int expectedYield: Possible values (2,1,0)which correspond to (high, medium, low)
- char roomID: ID of the room movie is playing in. Possible values: A, B, C, D,etc.
- int capacity: How many viewers can fit in room.
- int available: How many available for purchase still remain.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
