Preview

Ch. 2 Modules

Satisfactory Essays
Open Document
Open Document
381 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Ch. 2 Modules
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

    4) A firm has $500 million in revenue and explicit costs of $200 million per year. Its…

    • 2070 Words
    • 16 Pages
    Satisfactory Essays
  • Good Essays

    Econ1101 Past Exam

    • 1953 Words
    • 8 Pages

    THE UNIVERSITY OF NEW SOUTH WALES SCHOOL OF ECONOMICS SESSION 1, 2008 ECONllOl MICROECONOMICS I FINAL EXAMINATION TIME ALLOWED - 2HOURS…

    • 1953 Words
    • 8 Pages
    Good Essays
  • Satisfactory Essays

    Module1

    • 207 Words
    • 2 Pages

    HISTORY: This 35-year old white female gravida 3, para 1-0-2-1 had her last menstrual period in early January prior menstrual cycle had been regular to report using no contraception but not attempting pregnancy. Patient presented to the emergency room complaining a vaginal bleeding with pain in a lower pelvic area. Ultrasound preform in an emergency room pseudode 13.8 cm left at adnexal mass with positive cardiac activity compatible with ectopic pregnancy.…

    • 207 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Chapters 6 And 7 Module 2

    • 1747 Words
    • 3 Pages

    During the evil demon conjecture,he brought to question whether a demon wishing to deceive at every…

    • 1747 Words
    • 3 Pages
    Powerful Essays
  • Better Essays

    Forum 2 Linear Equations 2

    • 1133 Words
    • 4 Pages

    1) John spent $201 shirts and pants for work. Shirts cost $27 and pants cost $22. If he…

    • 1133 Words
    • 4 Pages
    Better Essays
  • Satisfactory Essays

    Module01 Summary

    • 412 Words
    • 2 Pages

    Weak Language is any word or phrase that does not add value to your message.…

    • 412 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Module 3

    • 250 Words
    • 2 Pages

    6 Assuming that the distribution of the preoperative CVLT Retrieval T scores is normal, the middle 68% of the patients had T scores between what two values?…

    • 250 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Module 3

    • 6144 Words
    • 19 Pages

    Mantiklos Apollo, statuette of a youth dedicated by Mantiklos to Apollo, from Thebes, Greece, ca. 700-680 BCE. Bronze, 8" high. Museum of Fine Arts, Boston.…

    • 6144 Words
    • 19 Pages
    Good Essays
  • Good Essays

    Re: Re: Module 2 Dq 1

    • 532 Words
    • 3 Pages

    This week’s topics included many interesting things, and I will touch on the areas that I thought were most important. The first area deals with the types of in-services that administrators provide to make sure that teachers have the appropriate skills to recognize the early signs of emotional behavioral disorder (EBD) in their students. How to intervene effectively to keep them from getting worse is another important area to cover. Another area is why an emotional or behavioral disorder should be considered a disability. I think that it is important to know what EBD is before it can properly be assessed, so that will be covered. Last but not least I will discuss instruction in an EBD classroom.…

    • 532 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Module 5

    • 430 Words
    • 2 Pages

    Create a car saying (Bumper Sticker) or a Road Sign (Billboard) that would describe one main point you learned in Module 5. This is an example of a bumper sticker from a former student: ““Driving the right speed is always a good deed. Enjoy your ride and don’t collide!”…

    • 430 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Module 1 Amp 2

    • 431 Words
    • 2 Pages

    1. I learned that you are not supposed to do whatever you want to do on the road its not only your road.…

    • 431 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    module one

    • 573 Words
    • 3 Pages

    Learner name Learner Journey Module 1 karen elsmore Vocational Learning Advisor name kelly bakewell Module 1 - Induction - your learning programme Tick all that apply 1. Who is funding your learning programme? crosscrown ltd 2.…

    • 573 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Tehilim Module 4

    • 1137 Words
    • 3 Pages

    1. Dovid composed this famous kapitol during one of the most dangerous and discouraging periods of his life. He was a forlorn fugitive, fleeing from Shaul Hamelech and his army. In desperation, Dovid hid himself in a barren, desolate forest that was very desert like because it was parched and dry.…

    • 1137 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Module 3

    • 306 Words
    • 2 Pages

    Explain the different forms of child abuse? Include Shaken Baby Syndrome in your response. The four different forms of child abuse are physical, emotional, sexual abuse, and neglect. Physical abuse is violence that is directed toward a child or an adolescent by a parent, adult, or guardian. Shaken Baby Syndrome (SBS) is an even more severe form of physical abuse that can be very dangerous if not deadly. Shaken Baby Syndrome is when a baby or a small child is shaken in such a violent way that there is damage to their bones, organs, brain, or even enough damage to cause death. Emotional abuse is when a child feels worthless or rejected to the acts of another adult or guardian but is not physically harmed. Sexual abuse is when someone is sexually explicit towards a child, shows a child pornography, or if a person’s genitals are exposed to a child. Neglect is when a parent is neglectful to a child. This is when the parent doesn’t put their child in school, doesn’t feel, clothe, or clean a child, or to fail to care for their child’s needs.…

    • 306 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Module assignment

    • 320 Words
    • 2 Pages

    What types of assessments are appropriate for ELL students? Discuss what you currently use for the identification and accommodation of ELL students who may be special education and/or gifted students.…

    • 320 Words
    • 2 Pages
    Satisfactory Essays