# Ch. 2 Modules

Satisfactory Essays
CST 170-Ch 2 Lab Assignment Name:___________________________

Exercises

1. Explain why each of the following names does or does not seem like a good variable name to you.

a. c –

b. cost –

c. costAmount –

d. cost amount

e. cstofdngbsns –

f. costOfDoingBusinessThisFiscalYear –

g. costYear2012 –

h.
2012YearCost

2. Assume that cost = 10 and price = 12. What is the value of each of the following expressions?

a. price – cost * 2

b.
15 + price – 3 * 2

c.
(price + cost) * 3

d.
4 – 3 * 2 + cost

e. cost * ((price – 8) + 5) + 100

3. Draw a typical hierarchy chart for a paycheck-producing program. Try to think of at least 6 separate modules that might be included. (Hint: You could have one module might calculate an employee’s dental insurance premium, you will need others to calculate federal and state taxes, and others to provide housekeeping, processing functionality, and output printing.)

4. Draw the hierarchy chart and flowchart(s) that map the logic for a program for the sales manager of The Couch Potato Furniture Company. The manager needs a program to determine the profit on any item sold. Input includes the wholesale price and retail price for an item. The output is the item’s profit, which is the retail price minus the wholesale price. Use three modules. The main program declares global variables and calls housekeeping, detail, and end-of-job modules. The housekeeping module prompts for and accepts a wholesale price. The detail module prompts for and accepts the retail price, computes the profit, and displays the result. The end-of-job module displays the message “Thanks for using this program”.

5. Create pseudocode that shows the logic for a program that generates a random number, then asks the user to think of a number between 1 and 10. Then display the randomly

## You May Also Find These Documents Helpful

• Satisfactory Essays

Module Two: Lab Questions 02.09: Self-Esteem and Child Development 1. Do you agree with Gever Tulley that the increasing safety regulations for children are limiting children’s opportunities to interact with the world around them? Why or why not? The increasing safety regulations for children are limiting children’s opportunities to interact with the world around them, because we’re moving away the child from real world. Anyway, the children are always going to figure out how to do the most…

• 388 Words
• 2 Pages
Satisfactory Essays
• Satisfactory Essays

Module 3 (Lesson 6) Lab Quiz Questions 1. What mineral composition is most characteristic of felsic rocks? a. olivine, pyroxene, and calcium-rich plagioclase NO b. orthoclase, quartz, and biotite c. calcium-rich plagioclase and hornblende with some olivine d. particles of volcanic ash welded together 2. What mineral composition is most characteristic of mafic rocks? a. olivine, pyroxene, and calcium-rich plagioclase b. orthoclase, quartz, and biotite c. sodium-rich plagioclase, hornblende…

• 740 Words
• 3 Pages
Satisfactory Essays
• Good Essays

MOBILE SERVICES GSM permits the integration of different voice and data services and the interworking with the existing network. GSM is defined for three different categories of services: bearer, tele, supplementary services. Figure shows the reference model for GSM services. A mobile station (MS) is connected to the GSM public land mobile network (PLMN) via Um interface. GSM-PLMN is the infrastructure needed for GSM network. This network is connected to transit network, e.g., integrated service…

• 6246 Words
• 25 Pages
Good Essays
• Satisfactory Essays

Review Questions 1. In what areas do children and adolescents define their self-esteem? -Children and adolescents usually define their self-esteem in social, academic and physical self-esteem areas. 2. What can a parent do, in the first two years of their child’s life, to help the child develop good self-esteem? -A parent can create a strong bond between child aqnd parent to help the child develop good self-esteem. 3. What are some things that have a negative effect on a child’s self-esteem? How…

• 617 Words
• 2 Pages
Satisfactory Essays
• Satisfactory Essays

Does street prostitution contribute to crime? If so how? If not explain your reason on why street prostitution does not contribute to crime. I believe that the COP strategy to deter the prostitutes and johns convicted of prostitution in St. Petersburg is not fair at all. Even though the johns that were convicted of prostitution receives a letter from the chief of police of the dangers of prostitution (venereal diseases, AIDS, etc) and the prostitutes denying access to certain areas where they are…

• 350 Words
• 2 Pages
Satisfactory Essays
• Good Essays

The four curriculum orientations presented in Van Brummelen's text “Steppingstones to Curriculum” are Christian, traditionalism, process and experimentalism. No matter what the perceived outcome, each theory has the same basic goal, to educate the learner and them know more at the end of the lesson, than at the beginning. Each view except for experimentalism is also linked together by the concept that “They set direction in life, giving it meaning and purpose (2002. 57) Looking at the other three…

• 376 Words
• 2 Pages
Good Essays
• Satisfactory Essays

MODULE 2 ASSIGNMENT 2 NAME :SMRITHI R PH: 9551060099 1. Montessori has become a very popular name in the recent times. What are the qualities a person should have to imbibe the real Montessori spirit? Ans. A Montessori directress is one who guides the children and helps them learn. A person involved in the Montessori house of children should have certain traits which will help them deal with children and help them to learn and grow. A person should have the following qualities : Be the connection…

• 827 Words
• 3 Pages
Satisfactory Essays
• Powerful Essays

engineering uk MODULE 2 PHYSICS 1 MATTER ....................................................................................... 1-1 1.1 NATURE OF MATTER.............................................................. 1-1 1.1.1 Si units ................................................................... 1-1 1.1.2 Base Units.............................................................. 1-1 1.1.3 Derived Units ......................................................... 1-2 1.1.4 MATTER AND ENERGY…

• 26811 Words
• 108 Pages
Powerful Essays
• Satisfactory Essays

Module 2 Exam Review -Please note the number in parenthesis is the lesson the answer can be found in./ 1. What is the study of motion called? (2.00) 2. All motion is relative to what? (2.01) 3. Define instantaneous and average speed and give examples. (2.01, 2.02) 4. Look at the graph below; be able to explain what quantity is the slope of a “Position versus Time” represents what the average speed for the first hour is, what distance is covered during each time interval, and what a horizontal…

• 526 Words
• 2 Pages
Satisfactory Essays
• Satisfactory Essays

Module 2 Exercises Problem 1: 1. Process cost systems are used to apply costs to similar products that are mass-produced in a continuous fashion. ANSWER = TRUE 2. A process cost system is used when each finished unit is indistinguishable from another. ANSWER = TRUE 3. Companies that produce soft drinks, motion pictures, and computers chips would all use process cost accounting. ANSWER = FALSE -Companies that produce soft drinks and computer chips would all use process cost accounting…

• 383 Words
• 2 Pages
Satisfactory Essays