Write a program that calculates how much an employee earn

Assignment Help Programming Languages
Reference no: EM13765827

Write a program that calculates how much an employee would earn over a period of time (in months), if, every month, the employee' pay-per-hour rate is one dollar more than the month before (so if his starting perhour rate is 7.25, next month it will be 8.25, next month 9.25, and so on). The employee is going to work 20 hours per week, 4 weeks per month.

The program should input from the user and validate both number of months (which should be a positive integer larger than 0) and the pay-per-hour rate (which should be a floating-point number larger than $7.25 - the minimum federal wage pay-per-hour rate). For each one of these values; if the value is wrong, the program should repetitively ask for that value until the value entered is correct. The program should confirm/output the correct value. See the INPUT number of months and INPUT pay-per-hour rate in the sample run table below.

The program should display/output a table (the table lines are not required) that shows for each month the employee's salary, and show the total pay at the end of the period. The output should be displayed in dollar amounts. Format your output to have a dollar sign ($) and the amount (with 2 decimals after the decimal point). See OUTPUT in the sample run table below.

For example, this can be an example of program run with input and output: INPUT number of months

Enter the number of months worked:

-5

You need to enter a positive number for the number of days. Try again!

Enter the number of days worked:

0

You need to enter a positive number for the number of days. Try again!

Enter the number of days worked:

5

You are going to be paid for 5 months.

INPUT

pay-per-hour

rate

Enter your starting per-hour pay rate:

-5

You need to enter a value larger than the minimum wage pay-per-hour rate which is $ 7.25.

Enter your starting per-hour pay rate:

9.6

Your starting pay-per-hour rate is going to be 9.6.

OUTPUT

Your salary for each month is:

Month 1: $768.00

Month 2: $848.00

Month 3: $928.00

Month 4: $1,008.00

Month 5: $1,088.00

Your total pay for the 5 months is $4,640.00.

Your program should work for any valid number of month and pay-per-hour rate. You can loose additional points according to the following table:

-5 For not documenting your code (should have a comment for each line of code , field, method, class, program,

etc)

-5 Every time you use a concept we did not study in class yet like user-defined functions, etc.

-5 For not using the correct program name or file name that does not have your name in it

-5 For not submitting the correct files

-25 For hardcoding the results ; i.e. printing out the expected results instead of computing the values and then outputting the computed values

-50 For cheating

The program/project should be called [YourName]-Assignment5 (replace [YourName] with your actual name). Take a screenshot of the editor window (showing the source code and the output) and save it as [YourName]-Screenshot (make sure you preserve the image file extension) or paste it in a document called [YourName]-Screenshot. Replace [YourName] with your actual name. Document your program (meaning follow the Assignment Code Convention, explain what each line of code does).

Reference no: EM13765827

Questions Cloud

Difference bettween dsum and dcount : What does a spreadsheet consist of
Items of income-gain-loss and deductions : How are the items of income, gain, loss and deductions received or incurred by ABC partnership and its partners reported for New York State tax purposes?
Write a book report of crows jazz anecdotes : Write a Book Report of Crow's Jazz Anecdotes, each student will write a two-page book report. Once again there is no specific format. Use your imagination and feel free to be personal and informal.
How did it change as a result of european expansion : How did it change as a result of European expansion and How is this change representative of what Sayre calls a "decentering" of culture?
Write a program that calculates how much an employee earn : Write a program that calculates how much an employee would earn over a period of time (in months), if, every month, the employee' pay-per-hour rate is one dollar
Write a paper on red nose lights way by fred flintstone : Write a paper on Red Nose Lights Way By Fred Flintstone.
How do government regulatory agencies : How do government regulatory agencies and laws impact business organizations? Choose one or two specific governmental regulatory requirements, and explain what affects they have on business organizations
What did the hr director mean by that : What did the HR director mean by that and To learn more about emotional intelligence, explore the sites listed below. Please take one of the Emotional Intelligence (EI) tests. Reflect on your results and explore ways that you might develop an enha..
What will be the benefits to native americans : What does Jackson believe will be the benefits to white Americans from this removal? What will be the benefits to Native Americans? Do you agree with his portrayal of these benefits, based on this week's readings

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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