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

    Module 3 and 4

    • 268 Words
    • 2 Pages

    Vocabulary: Please define six (6) of the following terms in your own words. Please do not just copy and paste the definition.…

    • 268 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 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

    Re: Module 2 Dq 2

    • 517 Words
    • 3 Pages

    The knowledge of the foundation and history of nursing provides a context to understand current practice is by, recognizing the nursing theories and framework set up prior nurses. We learn from Florence Nightingale, Dorothea Lynde Dix, Mary Mahoney, and other great nursing professionals of nursing practices performed in the past and how it evolved overtime. For example Florence Nightingale’s ascertainment and research contributed to development of environmental theory. It states, “the incidence of disease is related to ...the want of fresh air, or of light, or of warmth, or of quiet or of cleanliness.” (Selanders & Crane). The theory incorporated the recovery of the patient into the delivery of the healthcare. The patient not only needs medication but a clean sanitary environment for recovery. The environmental theory is still widely practiced in every hospital and medical center today demonstrating patient comfort.…

    • 517 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 1

    • 343 Words
    • 1 Page

    1. What are the differences between being a biological parent, an adoptive parent, and a foster parent? Biological parents: raises the child they created using their own DNA, adopted parents: raises a child they purchased through a private agency or adopted from foster care that they didn't/couldn't create using their own DNA, and foster parents: Many are rental parents in essence but many hope to adopt if they bond with the child. Many foster parents just foster kids for supplemental income and don't plan on adopting.…

    • 343 Words
    • 1 Page
    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
  • 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