Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are about to start a small business that rents out movies. The only movies that you are interested in falling into any of the

You are about to start a small business that rents out movies. The only movies that you are interested in falling into any of the following three categories: Fiction, Action, and Adventure. Create a class called MyMovies. Declare three attributes: movie_title, movie_category, and movie_length. The movie_title and movie_length attributes should be declared as public whilst the movie_category declared as private. how to create a method called set category that takes in a string parameter called category and checks whether the movie belongs to any of the three categories that are sold at the movie shop, that is, (Fiction, Action, and Adventure). If so, it should set the movie_category attribute value to this string value. If the category is not matching with any of the three, it should simply set the movie_category attribute value to uncategorized. how to create a method called setMovielength() that takes an integer parameter called length and sets the value of the movie_length attribute to the value passed to this parameter. how to create a method called setTitle () that takes a string parameter called title and sets the value of the movie_title attribute to the value passed to this parameter. Using C++

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

2. Discuss the components of a corporate mission statement

Answered: 1 week ago