CSI 115 Logic And Design

Hi I know you have got this same question ask to you a lot, but mine is for week 2 unstead of week 1. This week they want me to come up with and Create the Modular Design for the same subject as week 1, example underneath please.

A small startup software developer company needs to create a program that will calculate the pay of its employees. For the first version of the program, the company wants the program to accept an employee’s name, the number of hours the employee worked, and the hourly pay rate. The program will then calculate the gross pay, and display the employee’s name, number of hours worked, pay rate, and gross pay.

Using the design that you designed for Week 1, modify your design so that the following are done in separate modules:

1. Opening Message
2. Prompting and retrieving the input
3. Calculation for the total pay
4. Displaying the output
5. Program Termination

Create the pseudocode for each of the modules and the main module.


Here is my week one psuedocode.


//declare the variables and their respective data types
Declare String nameOfEmployee
Declare Real hoursWorked
Declare Real hourlyPayRate
Declare Real grossPay

//provide welcome statement and simple directions: enter values when prompted
Display “Welcome to the Pay Calculator”
Display “Enter the requested values to calculate the gross pay for an employee”

//get the input
Display “Please enter the employee Name”
Input employeeName
Display “Please enter the hours Worked”
Input hoursWorked
Display “Please enter the hourly pay rate”
Input payRate

//calculate the gross Pay
Set grossPay=hourlyPayRate * hoursWorked

//display the output
Display “The gross pay is“, employeeName, “is:”
Display “Hours worked:“, hoursWorked
Display “Hourly pay rate:“, hourlyPayRate
Display “Gross Pay:“, grossPay

//display termination message
Display “Thank you for using Pay Calculator”
Display “Enter any key to quit”
Input

  1. 👍 0
  2. 👎 0
  3. 👁 81
  1. Week 4: Iteration and Repetition - Exercises Help


    ________________________________________


    ________________________________________


    1. (TCO 5) The following is what type of loop?
    Declare Integer n = 1
    Declare Integer s = 0
    Declare Integer number
    Declare String keepGoing = "y"
    While keepGoing == "y"
    Display "Enter an integer."
    Input number
    Set s = s + number
    Set n = n + 1
    Display "Keep going? (Enter y or yes or n for no.)"
    Input keepGoing
    End While
    (Points: 1)
    count controlled pre-test
    count controlled post-test
    condition controlled pre-test
    condition controlled post-test


    2. (TCO 5) Which variable is the accumulator for the following loop?
    Declare Integer n = 1
    Declare Integer s = 0
    Declare Integer number
    Declare String keepGoing = "y"
    While keepGoing == "y"
    Display "Enter an integer."
    Input number
    Set s = s + number
    Set n = n + 1
    Display "Keep going? (Enter y or yes or n for no.)"
    Input keepGoing
    End While
    (Points: 1)
    n
    s
    number
    keepGoing


    3. (TCO 5) Which variable is the counter for the following loop?
    Declare Integer n = 1
    Declare Integer s = 0
    Declare Integer number
    Declare String keepGoing = "y"
    While keepGoing == "y"
    Display "Enter an integer."
    Input number
    Set s = s + number
    Set n = n + 1
    Display "Keep going? (Enter y for yes or n for no.)"
    Input keepGoing
    End While
    (Points: 1)
    n
    s
    number
    keepGoing


    4. (TCO 5) To which variable is the sentinel value assigned in the following loop?
    Declare Integer n = 1
    Declare Integer s = 0
    Declare Integer number
    Declare String keepGoing = "y"
    While keepGoing == "y"
    Display "Enter an integer."
    Input number
    Set s = s + number
    Set n = n + 1
    Display "Keep going? (Enter y for yes or n for no.)"
    Input keepGoing
    End While
    (Points: 1)
    n
    s
    number
    keepGoing


    5. (TCO 5) If the user enters 3, y, 6, y, 7 and n when prompted, what will be displayed by the pseudocode program?
    Declare Integer n = 0
    Declare Integer s = 0
    Declare Integer number
    Declare String keepGoing = "y"
    While keepGoing == "y"
    Display "Enter an integer."
    Input number
    Set s = s + number
    Set n = n + 1
    Display "Keep going? (Enter y for yes or n for no.)"
    Input keepGoing
    End While
    Display n, " ", s
    (Points: 1)
    7 7
    3 16
    4 16
    7 16


    6. (TCO 5) Assume the user enters 3 when prompted to enter the number of values. What value will be displayed by the pseudocode program?
    Declare Integer counter = 1
    Declare Integer maxValue
    Declare Integer s = 0
    Display "Enter the number of values"
    input maxValue
    While counter <= maxValue
    Set s = s + 2
    End While
    Display s
    (Points: 1)
    2
    6
    8
    No value will be displayed, it is an infinite loop


    7. (TCO 5) What value will be displayed by the following pseudocode program?
    Declare Integer counter
    Declare Integer accumulator = 0
    For counter = 1 to 3
    Set accumulator = accumulator + counter
    End For
    Display accumulator
    (Points: 1)
    9
    6
    3
    0


    8. (TCO 5) Which type of loop will always execute at least once? (Points: 1)
    While
    For
    Do-While
    Any pretest loop


    9. (TCO 5) Which of the following is not found in a For loop? (Points: 1)
    sentinel
    counter
    accumulator
    loop body


    10. (TCO 5) One of the following four types of loops can be used for any repetition structure needed in a program. (Points: 1)
    For loop
    While loop
    Do-While loop
    Do-Until loop

    ________________________________________

    1. 👍 0
    2. 👎 0

Respond to this Question

First Name

Your Response

Similar Questions

  1. chemistry

    Its 5:23pm Ive just checked to see if I've gotten a response,looks like mine has been skipped over. I see questions that were asked after mine and the one right before mine. I never got an answer. What's up?!

    asked by Connie on April 14, 2011
  2. Barkerville

    Would you have preferred to mine or to operate a business that supported the miners, if you had been an inhabitant of Barkerville during its gold rush? I would have chosen to operate my own business to support the miners. By

    asked by Emma on June 8, 2011
  3. socials--Barkerville the Evolution of a town

    Would you have preferred to mine or to operate a business that supported the miners, if you had been an inhabitant of Barkerville during its gold rush? I would have chosen to operate my own business to support the miners. By

    asked by Emma on June 8, 2011
  4. math

    Hi! I am new to Jishka and I need help checking my answers. 1. Which proportion can be used to determine what number is 15% of 30? A. 15/30 = x/100 (Mine) B. 15/100 = x/30 C. 15/100 30/x D. 30/100 = 15/x 2. Which equation can be

    asked by Lemon on January 20, 2015
  5. Texas history

    1. Wich of the following is a rquerment of all service sectors occupations? >expertise >transpotation < mine >haste >enthusiasm 6.which event had a lasting impackt on the texas econimy? solect all that apply >Bolivar >Galveston

    asked by :( on April 18, 2018
  6. Physiology

    Briefly answer the question about cellular processes. (Hint: think about the function of the cell in question.) Cells in the pancreas, which makes a lot of digestive enzymes, tend to have a lot of rough endoplasmic reticulum. Why?

    asked by Jerome on February 15, 2011
  7. Physics

    You are hiking out in California and come across an abandoned mine shaft. Wondering how deep the mine shaft is you toss a rock in and it takes 5.1 seconds before hitting the bottom. How deep is the mine shaft in meters?

    asked by Rachel on February 16, 2012
  8. Explanation for calc. answer

    I don't know how to answer this: A vector can be used to represent the path of a drill tip used to bore a deep mine shaft in Sudbury one quarter of the way to the centre of the Earth. Represent the vector using a directed line

    asked by Derek for drwls! on July 7, 2008
  9. URGENT: Calculus

    I don't know how to answer this: A vector can be used to represent the path of a drill tip used to bore a deep mine shaft in Sudbury one quarter of the way to the centre of the Earth. Represent the vector using a directed line

    asked by Derek for drwls! on July 6, 2008
  10. immigrant experience

    Im doing this activity which is called township in upper canada, and we each got a person whom we have to shift in their new lot. So basically Im imagining that I am that person and that Ive got my lot. My location ticket says

    asked by Sara on February 7, 2011
  11. linear programming

    Exeter Mines produces iron ore at four different mines; however, the ores extracted at each mine are different in their iron content. Mine 1 produces magnetite ore, which has a 70% iron content; mine 2 produces limonite ore, which

    asked by uma on June 6, 2012

More Similar Questions