Question
C++ C++ program that has a class declaration of the CD class which includes the following attributes: Artist (string) Title (string) Year Released (integer) The
C++
C++ program that has a class declaration of the CD class which includes the following attributes:
Artist (string)
Title (string)
Year Released (integer)
The program should have accessors and mutators for each class attribute. Also, have a constructor that initializes the data attributes to the appropriate null value - empty strings or 0. The class definition should include only the member function prototypes. Put the function definitions outside the class definition.
Include all of your code in one source file. Put the class definition and function code at the top of the file above your program function prototypes.
The menu will look like this:
1. Display Test CD
2. Math Break
3. Quit
When option 1 is chosen, your main should call a function that will be used only for option 1 in order to test your class code. Also, we need a CD object, set values, and then display the values.
NOTE
The main () controls the program. Your main () will never just call another function to do all the work. You will NEVER call main ().
NEVER use break, exit, return, pass, continue or anything to leave a loop (or iteration), function, or other construct prematurely, unless it is part of the structure as in a case statement.
NEVER have a function call itself, unless it is intentional recursion.
NEVER use global variables. However, you may use global constants if it is appropriate, and they are used properly.
have only one return statement in a function.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started