Lova D.

asked • 11/20/22

Write pseudocode to design a programming solution by outlining a series of steps and using appropriate indentation and keywords.

Problem: A company wants a program that will calculate the weekly paycheck for an employee based on how many hours they worked. For this company, an employee earns $20 an hour for the first 40 hours that they work. The employee earns overtime, $30 an hour, for each hour they work above 40 hours.

Example: If an employee works 60 hours a week, they will earn $20/hr. for the first 40 hours. Then they would earn $30/hr. for the 20 hours, they worked overtime. Therefore, they earned: ($20/hr. * 40hrs) + ($30/hr. * 20 hrs.) = $800 + $600 = $1400 total.


As you write your pseudocode, be sure to consider the following:

  1. What input does the computer need?
  2. What steps does the program need to follow to process the input? What output should result?
  3. When might you need to use decision branching? If you used decision branching, did you account for all possible input values?
  4. Did you use appropriate indentation and keywords (such as IF, ELSE, CALCULATE, and so on) throughout your pseudocode?


1 Expert Answer

By:

Max C. answered • 11/28/22

Tutor
5 (184)

Bachelors in Computer Science, 5+ Years of Experience

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.