B modify the program that computes gross pay to allow

  • No School
  • AA 1
  • alexmunoz2019
  • 18
  • 100% (20) 20 out of 20 people found this document helpful

This preview shows page 13 - 18 out of 18 pages.

b. Modify the program that computes gross pay to allow the user to enter the withholding tax rate. The program outputs the net pay after taxes have been withheld.
Programming Logic and Design, 9eSolutions 1-14Pseudocodestartinput hourlyRateinput hoursWorkedinput withholdingRategrossPay = hourlyRate * hoursWorkedwithholdAmt = grossPay * withholdingRatenetPay = grossPay - withholdAmtoutput netPaystop
Programming Logic and Design, 9eSolutions 1-159.Research current rates of monetary exchange. Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a number of dollars and convert it to Euros and Japanese yen.
10. A mobile phone app allows a user to press a button that starts a timer that counts seconds. When the user presses the button again, the timer stops. Draw a flowchart or write pseudocode that accepts the elapsed time in seconds and displays the value in minutes and remaining seconds. For example, if the elapsed time was 130 seconds, the output would be 2 minutes and 10 seconds.
Programming Logic and Design, 9eSolutions 1-16Answer: (Please note this solution assumes minutesis an integer and has been truncated.)FlowchartPseudocodestartinput elapsedTimeminutes = elapsedTime / 60seconds = elapsedTime – (minutes * 60)output minutes, secondsstopPerforming Maintenance1.In this chapter you learned that some of the tasks assigned to new programmers frequently involve maintenance—making changes to existing programs because of new requirements. A file named MAINTENANCE01-01.txt is included with your downloadable student files. Assume that this program is a working program in your organization and that it needs modifications as described in the comments (lines that begin with two slashes) at the beginning of the file. Your job is to alter the program tomeet the new specifications.
Programming Logic and Design, 9eSolutions 1-17

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture