Question: Homework 3 . 1 1 . [ Submit on zyLabs ] We are trying to write a function that implements a piecewise scheme for determining
Homework
Submit on zyLabs We are trying to write a function that implements a piecewise scheme for
determining whether the size of a widget is acceptable to send further along for production. Widgets for
our production line are flat, wide pieces that we use to construct a larger device. The following plot
illustrates acceptable widgets:
Where the areas in black are acceptable widgets, the gray areas are widgets that can be reprocessed,
and the areas in white are unacceptable widgets that need to be discarded. The black area is bounded by:
At the top, and:
At the bottom. The upper gray area is bounded by:
While the lower gray area is bounded by:
Write an equation that takes two inputs:
The area of a widget, a double that you can assume is greater than
The thickness of a widget, a double that you can assume is greater than
It should return one output:
A double with one of different values:
o for unacceptable widgets
o for widgets to be reprocessed
o for acceptable widgets
You can use the chart above to come up with test case numbers. For instance, an area of with a
thickness of would be unacceptable, an area of with a thickness of would be reprocessed, and
an area of with a thickness of would be accepHomework
Submit on zyLabs We are trying to write a function that implements a piecewise scheme for determining whether the size of a widget is acceptable to send further along for production. Widgets for our production line are flat, wide pieces that we use to construct a larger device. The following plot illustrates acceptable widgets:
Area or wiaget in
Where the areas in black are acceptable widgets, the gray areas are widgets that can be reprocessed, and the areas in white are unacceptable widgets that need to be discarded. The black area is bounded by:
thickness
At the top, and:
thickness
At the bottom. The upper gray area is bounded by:
thickness
While the lower gray area is bounded by: thickness
Write an equation that takes two inputs:
The area of a widget, a double that you can assume is greater than
The thickness of a widget, a double that you can assume is greater than
It should return one output:
A double with one of different values:
for unacceptable widgets
for widgets to be reprocessed
for acceptable widgets
You can use the chart above to come up with test case numbers. For instance, an area of with a
thickness of would be unacceptable, an area of with a thickness of would be reprocessed, and
an area of with a thiekness of would be acceptable.table.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
