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…
Module main() call salesTax
End Module
Module salesTax(Integer Value)
Declare Integer tax
Set tax = value * 0.02 * 0.04
Display tax
End Module
3. How Much Insurance? Many financial experts advise that property owners should insure their homes or buildings for at least 80 percent of the amount it would cost to replace the structure. Design a modular program that asks the user to enter the replacement cost of a building and then displays the minimum amount of insurance he or she should buy for the property.
Module main()
Call amount
Display cost
End Module
Module amount
Declare Integer cost
Display “Enter price”
Set cost = value * .80
End Module
4. Automobile Costs Design a modular program that asks the user to enter the monthly costs for the fol-lowing expenses incurred from operating his or her automobile: loan payment, in-surance, gas, oil, tires, and maintenance. The program should then display the total monthly cost of these expenses, and the total annual cost of these expenses.
Module main()
Declare Integer number
Display " Enter loan”
Input loan
Declare Integer number
Display " Enter insurance”
Input insurance
Declare Integer number
Display " Enter gas”
Input gas
Declare Integer number
Display " Enter oil”
Input oil
Declare Integer number
Display " Enter tires”
Input tires
Declare Integer number
Display " Enter maintenance”
Input maintenance
Call totalCost(
Offer- This is defined as a clear manifestation of willingness to enter an agreement made by another person with full understanding that their assent to the bargain is an invitation and is concluded.
A mechanism so that the module design information is contained in the module can not be accessed by other modules that are not concerned with such
How much of our global energy supply do nuclear power, biomass energy, and hydroelectric power contribute? How much of our global electricity do these three conventional energy alternatives generate?
2. Draw a flow diagram of the unit operations involved in sugar refining and at each step write a brief sentence explaining what is occurring. Use the information from SKIL site to develop your flow chart. Since the information does not start from the beginning of the refining process, please include an extraction step (extraction is explained in your textbook). Either milling or diffusion is
12. If there are values referenced continually in the application, storing them in packaged variables will allow the values to only be retrieved once thus saving data retrieval processing. The values in global constructs are persistent for the entire user session.
2. For your second relationship, identify the independent and dependent variables and describe the attributes of each.
Sophia Durban maintains a household in which she, her son (Ryan), and her widowed mother-in-law (Isabella) live. Since 2012, she also has provided more than half of their support. Sophia’s husband, Karl, left for parts unknown in April 2012 and excepts for one postcard, has not been heard form since. In the postcard (no return address included) that Sophia received in March 2013. Karl announced that he planned to claim both Ryan and Isabella as dependents on his own tax return.
The teacher has to be responsible for designing the scheme of work, lesson plans, obtaining up to date qualification handbooks, agree individual learning plans, carrying out risk assessments, write realistic aims.
(TCO 13) When a file is opened in output mode, the file pointer is positioned _____.
What is the thesis of Johnson’s essay? If it is stated directly, locate the relevant sentence or sentences. If it is implied, state the thesis in
Modules can be redesigned and programmed so that they can be used in other applications or systems.
2. The init () method is the module gets executed first. This makes a call to the display panel for calculator like structure/
Smalltalk uses untyped variables and they must be declared before using. The reason why variables should be declared is that we can inform the compiler to leave some memory space for variables. Python also in the same case that it has untyped variables but those do not need to be explicitly declared. Whenever assignment happens for variables, the declaration also occurs. Since no type checks happen at compile time, the responsibility is of programmers to ensure that variables will receive the correct kind of values. The two languages provide type conversions that will return the new objects represent converted values.
Classes: A class is specifically set of instructions that allow creating different objects, which define the
Let us consider of an example of syntax and semantics using while statement in C language