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

  Create a class uses a 25-element array of digits

Create a class HugeInteger which uses a 25-element array of didgits to store integers as large as 25 digits. Provide services inputHugeInteger, otputHugeInteger.

  Facilitate overcoming limits of security-merchant risk

What features do they include to facilitate overcoming limits of security, merchant risk, cost, etc.? How do they validate cardholder identities?

  Designing navigation system for point-and-click system

Design a navigation system or menu allows Access to act like point-and-click system. Write down some of the kinds of navigation.

  Implement the calculator using stacks and queues

You will implement the calculator using stacks and queues. Your calculator should support following operators: Parenthesis. The input will be given in form of infix expressions, e.g. ( 2 + 3 ) * 5.

  Invoke method to tell air conditioner object to turn on

Assume there is a reference variable myAC to an object of this class, which has already been created. Using the reference variable, invoke a method to tell the air conditioner object to turn on.

  Create class has constructor to reduce function of fraction

Create a class RationalNumber (fractions) with the following functionality: Has a constructor that prevents a 0 denominator in a fraction and calls the reduce function to simplify the fraction

  Historical principle for loss to the company is minimal

A colleague of yours frequently takes small amounts of office supplies, noting that the loss to the company is minimal. Your rationale expresses which historical principle?

  Write program to read data of four students from input file

Write C++ program which reads data of 4 students from the input file which name is given by user and displays summary report of students' marks on output file stdMarks.out"

  Computer sales and repair store system

It is required to design a relational database system for a "realistic" application

  Write a javascript function to validate a text-field

Write a JavaScript function to validate a text-field on a form that is to hold an email address. Now when writing this JavaScript function bear in mind that you won't be able to fully validate it unless you manage to interrogate the server in whic..

  Write a program that calculates a cars gas mileage

Write a program that calculates a car's gas mileage - The program should ask the user to enter the number of gallons of gas the car hold and the number of miles it can be driven on a full tank.

  Determine the output displayed

Determine the output displayed when the button is clicked. Determine the output displayed when the button is clicked. Assume the five lines of the file Dates.txt contain the numbers 1492, 1776, 1812, 1929, and 1941 and the file is in the appropriat..

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