Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ programming For this assignment please complete the following exercises. In addition to the requirements stated in these exercises for any classes that you create

C++ programming

For this assignment please complete the following exercises. In addition to the requirements stated in these exercises for any classes that you create you should also create a class diagram using UML.

Create a Television class.

  1. The attributes for the Television are:
    1. Manufacturer
    2. Model
    3. Screen Size
    4. Resolution
    5. Price
    6. Serial Number
    7. Power (i.e. on or off)
    8. Channel
    9. Volume
    10. Two other attributes of your own choosing
  2. Create a constructor for the class that receives Manufacturer, Model, Screen Size, Resolution, Price, and Serial Number. The constructor should set the attributes provided and provide default values for all other attributes. Include the attributes you provided as appropriate.
  3. Create an appropriate destructor.
  4. Provide separate Accessor/Get Methods that will return the values of the various attributes.
  5. Provide separate Mutator/Set Methods that will allow a user to turn the tv on/off, change the channel, and set the volume.
  6. Provide appropriate Accessor/Mutator methods for the attributes you provided.

Create a main program that utilizes the Television class

  1. Allow the user to create multiple televisions. Prompt the user for the number of televisions to create.
  2. For each television:
    1. Prompt the user for the Manufacturer, Model, Screen Size, Resolution, Price, and Serial Number (and any fixed attributes you provided). Ensure your program validates the information.
    2. Create an object for the Television.
    3. Using the Accessor Methods, display the Television's information (manufacturer, model, etc.).
    4. Allow the user to change the television's state (on/off, channel, volume, etc.). Validate any input before calling the appropriate functions.
    5. Allow the user to change any of the attributes you created (appropriately)
  3. Display the list of Television's and their information.

Be sure to include in your program:

  • An appropriate header comment and annotation,
  • Input validation of any values provided by the user.

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

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions

Question

Demonstrate how to use the Gaps Model for diagnosing and

Answered: 1 week ago