Movie Information Write a class named MovieInfo that holds data about movie. The class should have the following member variables: title: hold movie’s name category: hold movie’s category year: hold released year mins: hold running time in mins. Write a constructor that accepts arguments for each member variable, appropriate mutator functions that store values in these member variables, and accessor functions that return the values in theses member variables. Once you have written the class, write a separate program that creates four MovieInfo objects and stores the following data in them. Here is the information of four MovieInfo objects: moive1, moive2, moive3, moive4 movie1 title The Book of Life category Animation |Adventure | Comedy year 2014 mins 95 moive2 title Roman Holiday category Comedy | Drama | Romance year 1953 mins 118 movie3 title Kung Fu Panda category Animation | Action | Adventure year 2008 mins 92 moive4 title Two Brothers category Adventure | Drama | Family year 2004 mins 109 in C++
- Movie Information
Write a class named MovieInfo that holds data about movie. The class should have the following member variables:
title: hold movie’s name
category: hold movie’s category
year: hold released year
mins: hold running time in mins.
Write a constructor that accepts arguments for each member variable, appropriate mutator functions that store values in these member variables, and accessor functions that return the values in theses member variables. Once you have written the class, write a separate program that creates four MovieInfo objects and stores the following data in them.
Here is the information of four MovieInfo objects: moive1, moive2, moive3, moive4
|
movie1 |
title |
The Book of Life |
category |
Animation |Adventure | Comedy |
year |
2014 |
mins |
95 |
|
moive2 |
title |
Roman Holiday |
category |
Comedy | Drama | Romance |
year |
1953 |
mins |
118 |
|
movie3 |
title |
Kung Fu Panda |
category |
Animation | Action | Adventure |
year |
2008 |
mins |
92 |
|
moive4 |
title |
Two Brothers |
category |
Adventure | Drama | Family |
year |
2004 |
mins |
109 |
in C++
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images