Question: (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 program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
