Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Monitor class - Monitor.cpp Instructions: 2. Code the class cpp file and name it as Monitor.cpp. This should contain the setters and getter functions

C++

image text in transcribed

Monitor class - Monitor.cpp Instructions: 2. Code the class cpp file and name it as Monitor.cpp. This should contain the setters and getter functions that are not inline, including the getScreensize function and listMonitor function. Return type should be int. You do not need to round the results of the calculation. Class name: Monitor Private Member Attributes: 1. string brand 2. string model 3. int width (px) 4. int height(px) 5. int ppi 6. double refresh Rate (hz) 7. char speakers (Y/N) 8. int ports (no. of ports) 9. string portType (list of port types separated by commas) Public Members Functions that are not inline: 1. Setters (Mutators) for each member attribute 2. Getters (Accessors) for each member attribute returns the data type as specified in the attribute list. 3. getScreenSize() function that calculates the diagonal size of the monitor in inches. Be sure the data types will not demote numbers in the calculations. Use the formula below. 4. listMonitor function that list Monitor specifications. Brand: Acer, Model: H243H, Screen size (pixels) 1920x1080 @ 70ppi, (diagonal) "result of getScreensize" Diagonal = V (w/ppi)2 + (h/ppi)? Use: sqrt() and pow(x,y) functions

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_2

Step: 3

blur-text-image_3

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions