In C++   class film { public:     void setFilmDirector(string s); //sets the filmTitle to  s     void setFilmYear(string year);        //sets the private member filmYear to year     void setFilmProdCost(double cost);        //sets the private member filmProdCost to cost     void setFilmGenre (string type);        //sets the private member filmGenre to type     void printAllFilmInfo() const;        //prints the filmDirector, filmYear, the filmProdCost and the filmGenre     string geFilmGenre() const;        //returns the filmGenre     string getFilmYear() const;        //returns the filmYear     double getFilmProdCost() const;        //returns the filmProdCost     void updateFilmProdCost(double cost); //adds cost to the filmProdCost, so that the filmProdCost now has it original value plus the //parameter sent to this function private:     string filmDirector;     string filmYear;     double filmProdCost;     string filmGenre; };   Assume the following in your main program (the constructors above have been written and added): film Joker(“Todd Phillips”, “2019”,43550698, “drama”); Write the code in the main program that will print out the information about Joker. Write the code in the main program that will add 12 Million to the filmProdCost for Joker.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.2: Providing Class Conversion Capabilities
Problem 6E
icon
Related questions
Question

In C++

 

class film

{

public:

    void setFilmDirector(string s);

//sets the filmTitle to  s

    void setFilmYear(string year);

       //sets the private member filmYear to year

    void setFilmProdCost(double cost);

       //sets the private member filmProdCost to cost

    void setFilmGenre (string type);

       //sets the private member filmGenre to type

    void printAllFilmInfo() const;

       //prints the filmDirector, filmYear, the filmProdCost and the filmGenre

    string geFilmGenre() const;

       //returns the filmGenre

    string getFilmYear() const;

       //returns the filmYear

    double getFilmProdCost() const;

       //returns the filmProdCost

    void updateFilmProdCost(double cost);

//adds cost to the filmProdCost, so that the filmProdCost now has it original value plus the //parameter sent to this function

private:

    string filmDirector;

    string filmYear;

    double filmProdCost;

    string filmGenre;

};

 

Assume the following in your main program (the constructors above have been written and added):

film Joker(“Todd Phillips”, “2019”,43550698, “drama”);

  1. Write the code in the main program that will print out the information about Joker.
  2. Write the code in the main program that will add 12 Million to the filmProdCost for Joker.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Data members
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning