Unit #3 Programming Assignment
Course Outline HW & Programming Assignments

 

3pa2a

 

SURFACE ROUGHNESS

Engineers use several measures of the roughness of a surface of an object. These measures are based on measurements of deviations of the actual surface from its intended shape (see the visual). These deviations are provided in the file surface.txt. You must use it and also submit it under the name xxxx3padata.txt. Note that the first line of the file starts with the numbers. Each number represents a measurement ( d1, d2, d3, …….) at a different point of the surface. Positive values indicate location above the intended reference surface and negative values below the reference. There are n=56 measurements

The main measures of roughness are:

Write a program in C++ that reads these measurements from the file surface.txt and computes these three measures. Your program should prompt for and read upper bounds of acceptable roughness for each of the three measures. If the calculated measures exceed these given bounds, then the program should write an appropriate message. For example " the surface is too rough according the rms measure ".

 
You must prepare two files with the names xxxx3pa.cpp, xxxx3padata.txt.

 

 
Jacob Y. Kazakia © 2001 All right reserved