Question: Part 1. Write a program that uses a structure named MovieData to store the following information about a movie: title, director, year released, and running

Part 1.

Write a program that uses a structure named MovieData to store the following information about a movie: title, director, year released, and running time (in minutes). Include a constructor that allows all four of these member data values to be specified at the time a MovieData variable is created. The program should create two MovieData variables and pass each one in turn to a function called displayMovie that displays the information about the movie in a clearly formatted manner. Pass the MovieData variables by value to the function displayMovie.

Part 2.

Modify the Movie Data program written for the previous task to include a nested structure named DirectorInfo that stores the name, the company, and the city of the director. In this task the director field of the MovieData structure is a DirectorInfo structure. The program should be updated to set the fields of the nested structure, and the function displayMovie should be able to display them. Figure 4 shows a snapshot of the updated programs output.

Figure4

title: War of the Worlds

Director: Byron Haskin

Company: Walt Disney

City: Burbank, CA

Released:1953

Running Time:88

Title: War of the Worlds

Director: Stephen Spielberg

Company: Amblin Entertainment

City: Universal City, CA

Released:2005

Running Time:118

*Part 1 is done but I need help doing part 2. It has to be in C++

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 Databases Questions!