Homework Chapter 3 Essay

1568 Words Apr 30th, 2014 7 Pages
Multiple Choice
1) Module
2) Divide and Conquer
3) Header
4) Call
5) Return
6) Top-down Design
7) Flowchart
8) Local Variable
9) Scope
10) Argument
11) Parameter
12) By Value
13) By Reference
14) Global variable
15) Global

True or False
1) False
2) True
3) True
4) False
5) True
6) False
7) False
8) True
9) True
10) False
11) True
12) False

Short Answers
1) You can call the module several times instead of writing it out each time.
2) The header is the starting point and the body is a list of statements that belong to the module.
3) It will return back to its previous point in the program.
4) A local variable is declared inside the module only. Only the statements inside the module can access it.
5) A
…show more content…
Property Tax A county collects property taxes on the assessment value of property, which is 60 percent of the property’s actual value. For example, if an acre of land is valued at $ 10,000, its assessment value is $ 6,000. The property tax is then 64¢ for each $ 100 of the assessment value. The tax for the acre assessed at $ 6,000 will be $ 38.40. Design a modular program that asks for the actual value of a piece of property and displays the assessment value and property tax.

Module main()
Declare Integer number
Display "Enter property value"
Input number
Call propertyTax( number)
End Module

Module propertyTax( Integer value)
Declare Integer result
Set result = value * .60
Display result
End Module

6. Body Mass Index Design a modular program that calculates and displays a person’s body mass index ( BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for their height. A person’s BMI is calculated with the following formula: BMI = Weight × 703/ Height2

Module main()
Declare Integer number
Display "Enter weight"
Input weight
Declare Integer number
Display "Enter height"
Input height
Call bmi( number)
End Module

Module bmi( Integer value)
Declare Integer result
Set result = weight * 703 / height
Display result
End Module

7. Calories from Fat and Carbohydrates A nutritionist who works for a

Related Documents