Write a C++ program named Movies that uses a struct to store attributes of Movies. These will be the title, the year it was released and the star of the movie. This is a multi-file program. Declare the struct in the .h file. Add four functions: WriteHeader, Goodbye, PrintMovie and AskForFaveMovie, and pass them a struct object using call by reference. In main, create two struct objects, mine and yours. Initialize the stuct with values for mine, that is, your favorite movie. Ask the user for their favorite movie and the data by passing the yours Movies object to the function AskForFaveMovie. Call PrintMovie twice, once to display the favorite of mine and once to display the favorite of yours.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter11: Introduction To Classes
Section11.3: Adding Class Functions
Problem 8E
icon
Related questions
Question

Write a C++ program named Movies that uses a struct to store attributes of Movies. These will be the title, the year it was released and the star of the movie.

This is a multi-file program. Declare the struct in the .h file. Add four functions: WriteHeader, Goodbye, PrintMovie and AskForFaveMovie, and pass them a struct object using call by reference.

In main, create two struct objects, mine and yours. Initialize the stuct with values for mine, that is, your favorite movie. Ask the user for their favorite movie and the data by passing the yours Movies object to the function AskForFaveMovie.

Call PrintMovie twice, once to display the favorite of mine and once to display the favorite of yours.

AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr