your program with data in Testing and with one more set of different d the 2 outputs. Include reasonable number of comments. ITIAL ALGORITHM 1. Get the washer's inner diameter, outer diameter, and thickness. 2. Get the material density and quantity of washers manufactured. 5. Compute the rim area. 1. Compute the weight of one flat washer.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

07..

 

Problem 1.1. Initial Design, Implementation and Testing - complete all steps below;
Test your program with data in Testing and with one more set of different data. Submit .cpp file
and the 2 outputs. Include reasonable number of comments.
(maxaumoints)
INITIAL ALGORITHM
1. Get the washer's inner diameter, outer diameter, and thickness.
2. Get the material density and quantity of washers manufactured.
3. Compute the rim area.
4. Compute the weight of one flat washer.
5. Compute the weight of the batch of washers.
6. Display the weight of the batch of washers.
ALGORITHM REFINEMENTS
Step 3 Refinement
3.1 Compute holeRadius and edgeRadius.
3.2 rimArea is PI * edgeRadius * edgeRadius
PI * holeRadius * holeRadius
Step 4 Refinement
4.1 unitweight is rimArea * thickness * density
IMPLEMENTATION
To write this program, edit the data requirements to write the variable dec-
larations and use the initial algorithm with refinements as a starting point
for the executable statements. Listing 3.4 shows the C++ program.
TESTING
To test this program, run it with inner and outer diameters such as 2 centimeters
and 4 centimeters that lead to easy calculations for rim area (3 PI square cen-
timeters). You can verify that the program is computing the correct unit weight
by entering 1 for quantity, and then verify that the batch weight is correct by
running it for larger quantities.
Your First Output:
Inner diameter in centimeters: 1.2
outer diameter in centimeters: 2.4
Thickness in centimeters: 0.1
Material density in grams per cubic centimeter: 7.87
Quantity 1n batch: 1000
The expected weight of the batch is 2670.23 grams.
Transcribed Image Text:Problem 1.1. Initial Design, Implementation and Testing - complete all steps below; Test your program with data in Testing and with one more set of different data. Submit .cpp file and the 2 outputs. Include reasonable number of comments. (maxaumoints) INITIAL ALGORITHM 1. Get the washer's inner diameter, outer diameter, and thickness. 2. Get the material density and quantity of washers manufactured. 3. Compute the rim area. 4. Compute the weight of one flat washer. 5. Compute the weight of the batch of washers. 6. Display the weight of the batch of washers. ALGORITHM REFINEMENTS Step 3 Refinement 3.1 Compute holeRadius and edgeRadius. 3.2 rimArea is PI * edgeRadius * edgeRadius PI * holeRadius * holeRadius Step 4 Refinement 4.1 unitweight is rimArea * thickness * density IMPLEMENTATION To write this program, edit the data requirements to write the variable dec- larations and use the initial algorithm with refinements as a starting point for the executable statements. Listing 3.4 shows the C++ program. TESTING To test this program, run it with inner and outer diameters such as 2 centimeters and 4 centimeters that lead to easy calculations for rim area (3 PI square cen- timeters). You can verify that the program is computing the correct unit weight by entering 1 for quantity, and then verify that the batch weight is correct by running it for larger quantities. Your First Output: Inner diameter in centimeters: 1.2 outer diameter in centimeters: 2.4 Thickness in centimeters: 0.1 Material density in grams per cubic centimeter: 7.87 Quantity 1n batch: 1000 The expected weight of the batch is 2670.23 grams.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY