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 program to permit user to enter last names

Write down the program which permits the user to enter last names of five candidates in local election and number of votes received by each candidate.

  You have in your program an arraylist which contains

you have in your program an arraylist that contains employee salaries double type in arbitrary order. you need to

  Program to compute pearson correlation coefficient

Write down a program to compute Pearson correlation coefficient by using parallel loop templates from Intel Threading Building Blocks library (TBB).

  You are consulting for an organization that has unix linux

question 1 the small company where you work needs to implement a second server for its accounting systems but does not

  Implement a program that prompts the user for an integer

Implement a program that prompts the user for an integer n and prints the nth Fibonacci number, using the above algorithm.

  Design program which models worms behavior

Design a program that models the worms behavior in the following scenario: A worm is moving toward an apple. Each time it moves, the worm cuts the distance between itself and the apple.

  Create link invisible to begin-display after submit button

Create link invisible to begin but display it after Submit button has been clicked. Confirmation page should say "Thank you for your order".

  My goal is to write down a php database application with a

my goal is to write a php database application with a gui that will display and update information on a remote database

  Write class to hold hourly rate of pay

Write down the class which comprises variables which hold your hourly rate of pay and number of hours that you worked. Illustrate your gross pay.

  Write down a recursive method to print all the permutations

write a recursive method to print all the permutations of a string. for instance for a string abc the printout is abc

  Write program to prompt for and accept current salary

Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases.

  Write pseudocode for worm moving toward apple

Worm is moving toward an apple. Each time it moves, worm cuts distance between itself and apple by its own body length until worm is close enough to enter the apple. Give pseudocode for this.

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