Guidelines of good program design

Assignment Help Basic Computer Science
Reference no: EM131893449

Payroll

A local small business has hired you to write the payroll calculation program. The program only needs to calculate gross pay for an employee and display the results. Your program will accept the employee's name, hours worked, and the employee's pay rate. The program will need to calculate overtime as well. Overtime is defined as anything over 40 hours is paid at 1.5 times the regular pay. The program should print the employee's name, the gross pay amount, and only if there was overtime, print the overtime pay amount as well. Finally, the program should repeat as necessary until the user enters a sentinel value.

Remember to follow the guidelines of good program design. Make sure to use meaningful variable names, include comments as needed, and provide thoughtful output.

Example output:

C:>python week2.py

ABC Inc., Gross Pay Calculator!

Enter employee's name or 0 to quit: Nathan

Enter hours worked: 35

Enter employee's pay rate: 10.00

Employee Name: Nathan

Gross Pay: 350.0

Enter next employee's name or 0 to quit: Toby

Enter hours worked: 45

Enter employee's pay rate: 10

Employee Name: Toby

Gross Pay: 475.0

(overtime pay: 75.0 )

Enter next employee's name or 0 to quit: 0

Exiting program...

Reference no: EM131893449

Questions Cloud

What would your ideal job look like : Discussion-Your Ideal Job. In a perfect world, what would your ideal job look like? Have you engaged in any planning to achieve this ideal
Explain how would improve the current situation : Discuss your viewpoints on the question of whether patients can adequately understand and judge the quality of the health care services they receive.
Crisps uses discount rate for all NPV analysis : Crisps has received an order for 14500 bags of potato chips from BigBag. Crisps uses a discount rate of 6.45% for all NPV analysis.
Problems associated with a reactive risk strategy : Provide five examples from other fields that illustrate the problems associated with a reactive risk strategy.
Guidelines of good program design : Remember to follow the guidelines of good program design. Make sure to use meaningful variable names, include comments as needed
Identical size operating in identical markets : Two identical firms of identical size operating in identical markets. Calculate the level of EBIT that would make earnings per share the same for Ski and Board.
Enter the number of shirts being laundered : The interface provides a text box for the user to enter the number of shirts being laundered. You want to make sure a string typed
Compare the competing visions of health care administration : Write a paper of 1,000-1,200 words that compares and contrasts the competing visions of health care administration among stakeholders.
Discuss the biggest threats to a company : Can someone help me discuss the biggest threats to a company's information security and how do I propose that IT protects against those threats.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explaining the most common security threats

Create a 10-slide basic or interactive presentation explaining the most common security threats, modern threats to current Client and Network Operating Systems, Encryption, Authentication, and Hashing. Include the narrator notes as a separate atta..

  What consistency model would be implemented

what consistency model would be implemented?

  Give a possible arrangement of subnet masks

Give a possible arrangement of subnet masks to make this possible.

  Define the role of streaming media to support

Research the role of streaming media to support organizational objectives. What are three possible ways that streaming media can be used to accomplish the objectives of an organization

  Complete the execution of programs

Consider a system that has two CPUs, each CPU having two threads (hyperthreading). Suppose three programs, P0, P1, and P2, are started with run times of 5, 10 and 20 msec, respectively. How long will it take to complete the execution of these progr..

  Drop-down menu that lists three famous places

A form using HTML5, CSS, and JavaScript® that has a drop-down menu that lists three famous places. When the user selects a place from the drop-down menu

  What is a field effect transistor

What is a field effect transistor (FET)? Which are the different types of FET's available? Draw the circuit arrangement for obtaining the drain characteristics of a JFET and explain the procedure for obtaining the above characteristic curves. Illu..

  Examine the goals of coupling and cohesion

Examine the goals of coupling and cohesion and the approaches to design you use to achieve those goals for your design.

  Project plan for a new internal support system

Cash flow statements would be used as inputs to diagnose the performance of a project and determine shareholder value.

  Develop a raptor flowchart to compute the solution

Develop a Raptor flowchart to compute the solution of the equation

  Relationships are addressed using the relational model

Please describe and explain how one-to-one recursive relationships are addressed using the relational model. Also provide 2 examples

  Ways which online tutoring varies from in-person tutoring

In three paragraphs or more, explain the following: Write down three ways in which online tutoring varies from in-person tutoring.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd