Textbook Page 619,Question 11 (Movie class)

1 answer below »
Textbook Page 619,Question 11 (Movie class)
Answered Same DaySep 23, 2021

Answer To: Textbook Page 619,Question 11 (Movie class)

Piyush answered on Sep 25 2021
150 Votes
orderid44967/bin/Debug/Order_ID_44967.exe
orderid44967/main.cpp
orderid44967/main.cpp
#include 
#include 
using n
amespace std;
class Movie{
public:
    Movie();
    Movie(string name,string rating);
    string getMovieName(void);
    void setMovieName(string name);
    string getRating(void);
    void setRating(string rating);
    bool addRating(unsigned int rating);
    float getAverage(void);
private:
    string MovieName;
    string MPAARating;
    unsigned int Number_Rated_1;
    unsigned int Number_Rated_2;
    unsigned int Number_Rated_3;
    unsigned int Number_Rated_4;
    unsigned int Number_Rated_5;
    float average;
};
Movie::Movie()
{
    MovieName = "None";
    MPAARating = "None";
    Number_Rated_1 = 0;
    Number_Rated_2 = 0;
    Number_Rated_3 = 0;
    Number_Rated_4 = 0;
    Number_Rated_5 = 0;
    average = 0.0;
}
Movie::Movie(string name, string rating)
{
    MovieName = name;
    MPAARating = rating;
    Number_Rated_1 = 0;
    Number_Rated_2 = 0;
    Number_Rated_3 = 0;
    Number_Rated_4 = 0;
    Number_Rated_5 = 0;
    average = 0.0;
}
string Movie::getMovieName(void)
{
    return MovieName;
}
void Movie::setMovieName(string name)
{
    MovieName = name;
}
string Movie::getRating(void)
{
    return MPAARating;
}
void Movie::setRating(string ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here