Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design a class called MovieData to store the following information about a movie

ID: 3566221 • Letter: D

Question

Design a class called MovieData to store the following information about a movie:

Title (a string )

Director (a string )

Year Released (an integer )

Running time (in minutes - an integer )


Include a constructor that allows all four of these member data values to be specified at the time a MovieData variable is created (use the above order for the parameters ). The class should also provide a member function, print, that displays the information as follows:

     Title (Year). Directed by Director. (Running time minutes)

Example:

     The Good, The Bad and The Ugly (1966). Directed by Sergio Leone. (161 minutes)

Explanation / Answer

class moviedata
{
   char title[20],director[20];
   int year,running_time;
   public:
       void moviedata(char*title,char*director,year,running_time);
       void print
       {
           cout<<title<<"("<<year<<").Directed by Director."<<director<<"("<<running_time<<")";
       }  
};

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote