Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The screen size of a TV is given by the length of the rectangular diagonal. Standard TVs come in 4:3 ratio, that is, the ratio

The screen size of a TV is given by the length of the rectangular diagonal. Standard TVs come in 4:3 ratio, that is, the ratio of length to width is 4 to 3. This means, if the length is x inches, then the width is (3/4)x. Widescreen TVs come in 16:9 ratio. Write a program that prompts the user to input the length of the diagonal (in inches) of the screen and allows the user to select which type of TVs screen length, screen width, and screen area the user would like to calculate. Have the program display the desired results. Guidance To solve this problem, recall that the diagonal of a TV screen forms the hypotenuse of a right triangle with the length and width forming the sides. The diagonal is given and the length, width, and area need to be calculated. Since there are two unknowns (length and width), two equations will be required. The first equation comes from the formula for the Pythagorean Theorm. The second equation comes from the ratios provided for standard and wide screen TVs. A good way to allow a user to make a selection is to present them with a menu of options. The output they see is based on which option they select. For example, the user could be presented with a menu that looks like this: Enter which type of TVs area you would like to see: 1: Standard TV area. 2: Widescreen TV area. 3: Both types of TVs area. Once they make a selection, use a nested if or a switch statement to process the options. Turn in: Your analysis and test plan (hand written or Word document). Your C++ source code with IPO comments (file with the .cpp extension). Screen shots of your test results

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

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

Describe the role of HRD practitioners in OD interventions

Answered: 1 week ago