subject

You've been hired by Paycheck Penguins to write a C++ console application that determines the pays and taxes on a paycheck. Use a validation loop to prompt for and get from the user a paycheck period in the range A-Z. Each letter corresponds to a two-week period. Use a validation loop to prompt for and get from the user an hourly real-number rate in the range 18-36 $/hour. Use a validation loop to prompt for and get from the user an integer number of hours worked in the range 60-120. Then calculate the gross pay, federal tax, FICA (Social Security and Medicare) tax, state tax, and net pay based on the hourly rate and time worked. Here are the formulas:

gross pay = hourly rate * time worked
federal tax = gross pay * 0.15
FICA tax = gross pay * 0.0765
state tax = gross pay * 0.0435
net pay = gross pay – federal tax – FICA tax – state tax

Format the following eight outputs into two formatted columns:

Paycheck period
Hourly rate
Hours worked
Gross pay
Federal tax
FICA tax
State tax
Net pay

The first column is a left-justified label with units ($/hour, hours, $, etc.) as needed. The second column is a right-justified value. Format all real numbers to two decimal places. Use formatted output manipulators to print the output. Declare and use constants for the federal tax rate, FICA tax rate, gross pay rate, and the column widths. Run the program five times with different inputs for hours worked and hourly rate. What are the results?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Write a function that draws a pool ball. this function should take as parameters, the color, the number that should go on the pool ball, and the location of the center of the pool ball. the radius of the pool balls should be pool_ball_radius, and the font of the number should be pool_ball_font. the text of the pool ball font should be white. drawpoolball(color.orange, 5, 100, 100); drawpoolball(color.green, 6, 50, 200); drawpoolball(color.red, 3, 150, 350); drawpoolball(color.blue, 2, 250, 140); to center the numbers on the pool ball, you should use the getwidth() and getheight() methods. you are allowed to call these methods on your text object, such as txt.
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
This graph compares the cost of room and board at educational institutions in texas.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since itÒ€ℒs an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
You draw two cards from a standard deck of 52 cards, but before you draw the second card, you put the first one back and reshuffle the deck. (a) are the outcomes on the two cards independent? why?
Answers: 3
You know the right answer?
You've been hired by Paycheck Penguins to write a C++ console application that determines the pays a...
Questions
Questions on the website: 13722362