Question: Part One Write a C + + program that uses a structure named MovieData to store the following information about a movie: title, director, release

Part One
Write a C++program that uses a structure named MovieData to store the following information about a movie: title, director, release year, and running time.
The program should create two MovieData variables and initialize all members. Then pass each movie structure in turn to a function (that accepts "one" structure) that displays the information about the movie in a clearly formatted manner. Pass the MovieData variable to the display function by value.
Part Two
Modify the Movie Data program to include two more members that hold the movies production costs and first-year revenues. Modify the function that displays the movie data to display the title, director, release year, running time, and first years profit or loss. Also, improve the program by having the MovieData variables passed to the display function as constant references.
Example run:
Title Director Release Year Running Time
Avatar James Cameron 2023180
First year profit was $1500000.00
Title Director Release Year Running Time
Bullet Train David Leitch 2023150
First year loss was $-7500.00
Part One Write a C + + program that uses a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!