Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(C ++ , do not use stdio.h) Write a class named TV that has the following member variables: Year: An int that holds the TV's
(C ++ , do not use stdio.h)
Write a class named TV that has the following member variables: Year: An int that holds the TV's model year Brand: a string that holds the brand of the TV Price: a double that holds the TV's price. . The class should also has the following member functions Constructor. The constructor should accept the TV's year and brand as arguments and assign these values to the object's year and brand member variables. The constructor should initialize the price member variable to '0'. Accessor: Appropriate accessor functions should be created to allow values to be retrieved from an object's year and brand member variables. Mutator: Appropriate mutator functions should be created to allow values to be set for an object's price member variable. Demonstrate the use of the class in a simple programStep 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