Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ ONLY!!! PLEASE ANSWER QUESTION THEN FILL OUT THE TABLE WITH DIFFERENT INPUT! Test plan for this question is only done once, for any of

C++ ONLY!!! PLEASE ANSWER QUESTION THEN FILL OUT THE TABLE WITH DIFFERENT INPUT! image text in transcribed
image text in transcribed
Test plan for this question is only done once, for any of the three loops, but source-code for all three loops must be submitted. Generate a random number, R, with value ranging from 2 to 5 (both inclusive). Then, ask the user for R integers in the range of -50 to 50 (inclusive) and print their final average. If a user's number is outside the acceptable range then have them try again until a valid number is given. 1. Solve the above using a for loop 2. Repeat, using a while loop instead of a for loop. 3. Repeat, using a do-while loop instead of a for loop. Example: R has value 9 so your program will loop, getting 9 values from the user. The user enters 111 for their 3rd number so your program asks them to try again, giving you a new 3rd number. Hint: get your program working with a random number that isn't seeded and use that for testing. When working properly, add the seed statement so the number is truly random and do one final test to ensure the program still works correctly. After reading the question requirements, but before beginning any coding, create the test case table, below, completed through column Expected Output. Write your program then complete the test table with actual output results and include in your report, AFTER your source code - Every branch, loop, and output message should be tested. - Test for ID 10 T user imput Copy/Paste your completed source code. You must always include standard "comment header" in your programs, even if code is provided. Run all tests in your test plan - If a test produces expected output, type that output into Actual Output column and enter Pass in final column - If a test doesn't produce expected output - If it's because you didn't understand what the computer would produce/do, then correct the expected output and complete test row as above - If it's because there was a logic/semantic error in your program, enter Fail, create a new test row (5a if test was 5 ), correct your program, test again - Include your completed test plan after source code - Paste in a snippet of output showing results for every listed test case, labeled with test \# Test Table

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

What is the effect of word war second?

Answered: 1 week ago

Question

3. How has e-commerce transformed marketing?

Answered: 1 week ago