//Sam Trivikraman CS1A Chapter 11, p. 645, #1
//
/*
******************************************************************************
Store Movie Data
_______________________________________________________________________________
This program stores user inputted movie data.
_______________________________________________________________________________
INPUT
movie title : The title of the movie
movie director : The director of the movie
movie release year : The movie's release year
movie run time : The movie's run time
OUTPUT
array of movie details : An array that stores all of the details for the movie
_______________________________________________________________________________
*******************************************************************************
*/
#include <iostream>
using namespace std;
//a structure that stores all of the movie data
struct MovieData
{
string title; //INPUT movie title
string director; //INPUT movie director
int yearReleased; //INPUt movie year released
int runTime; //INPUt movie run time
};
int main() {
// your code goes here
MovieData movieOne; //OUTPUT the first movie
MovieData movieTwo; //OUTPUT the second movie
//ask user for the movie details for the first movie
cout << "Please enter the title of the first movie" << endl;
cin >> movieOne.title;
cout << "Please enter the director of the first movie" << endl;
cin >> movieOne.director;
cout << "Please enter the year that the first movie was released" << endl;
cin >> movieOne.yearReleased;
cout << "Please enter the first movie's run time (in minutes)" << endl;
cin >> movieOne.runTime;
//ask user for the movie details for the second movie
cout << "Please enter the title of the second movie" << endl;
cin >> movieTwo.title;
cout << "Please enter the director of the second movie" << endl;
cin >> movieTwo.director;
cout << "Please enter the year that the second movie was released" << endl;
cin >> movieTwo.yearReleased;
cout << "Please enter the second movie's run time (in minutes)" << endl;
cin >> movieTwo.runTime;
//Output the details for movie 1
cout << "Movie One details: " << endl;
cout << "Title: " << movieOne.title << endl;
cout << "Director: " << movieOne.director << endl;
cout << "Release Year: " << movieOne.yearReleased << endl;
cout << "Run Time: " << movieOne.runTime << endl;
//Output the details for movie 2
cout << "Movie Two details: " << endl;
cout << "Title: " << movieTwo.title << endl;
cout << "Director: " << movieTwo.director << endl;
cout << "Release Year: " << movieTwo.yearReleased << endl;
cout << "Run Time: " << movieTwo.runTime << endl;
return 0;
}