Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this sipment, write a program that we function to calculate the weekly payment amount for an employee of Purple rune Press The employee's weekly

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
For this sipment, write a program that we function to calculate the weekly payment amount for an employee of Purple rune Press The employee's weekly payment is based on 1. The number of hours weed minimum 0,0) 2. The bly wage - (minimum 50.00, maximum: 530.00) 3. The number of exemption, animum) The three values will be used to calculate 1. Gross payment mount 2. Federal nome tax withheld 3. State income tax well 4. Social Security withheld 5 el pay ATVII Basic Logic for int main() Declare my wables that are de Call the wildet mitt is deribet blow to preberet hoe player work. The most between 0 and 60 ribove. Make sure to win a more the value function in weer wat Cut the function that is deur het low was the hourly wage for the employ the volumut 0.00 0.00 ed eve. Made were the value that is more from WMD untio is able viable Cavalt in the desired whow to the whole employer cluned. The value mau beberemo und 5 sented above. Make sure to save the value that is returned from the Call the groPay function that is described below to calculate the employer Make the type only the beamed the valuable call and we the lower temperatured that is van all the way. The value is the function in de Calle oder went this described helew to the most effect that is with the employee Make sure to per the player cunt (the dealer from the day and the role warm the way to the front. The authorised from the Federal Titanic should be savetinare Call the stoc that is described below the mean that is whom they Make the complete www med de la cade med the employermed the game from the alloween Thevalier informed the function should be wwe in de varie Call the clear that is de chocolate with the employer Memployers duble wall 24 - Page 21 Basic Logic for int main() Declare any variables that are teeded call the validit function that is described below to get the number of how the employee worked. The value must be between 0 und 60 a mentioned above. Make sure to save the value that to returned from the validint function in winter variable Call the valldDouble function that is described belows get the beauty wape to the employee. The value os be between 0.00 and 20:00 side. Make the value that is perurned from the valdDohle function in a double variable Call the validitat function that is described below to get the aber el exemption the employee claimed. The value must be between 0 und mentioned above. Make sure to save the value that is returned from the validi function in an integer variable Call the relay function that is described below to calculate the employee's gross payment amount. Make sure to the holy wap for the employee the value etme from the value call and the mumber of hours the employee worked (the integreret med from the final call to the Payme. The value that is netured from the growly functioned in the latte Cill the federal'la fonction that is described below about the mount of feedinome that is withheld from the playe. Make sure to pass the employees at the double vale remed from the group call the tumber of exemptiom the employee claimed the departure from the condal to the federal function. The value tal tuned from the final function should be saved in a varie Call the states function that is described below to calculate them of state income tax is where the employer. Make sure to the employees groupement amount the double she returned from the group call and the musiker of emption the employee claimed (the legale e rend validitain to the fint. The value that it is the function solde saved in die Call Security function that is derhed below all the control that is with from the employer Mikeep the employer pyntede valore then the group to the city function. The value that is from water te should even de variable Call the day the below the employees. Make to pass the employersynet mcm the dated from they can the of federal come to that is with from the employee the deve returned the terra, theo the employee themelore the wa/The calls, and the most of cal security withheld from the time duble Where catecurity cality to be there. The shut is om te wil we tholde ved in die arbe Diply the sumber of loans the clee worked the holy wage for the employ the employees them offer income to this with them, the income tax that is will held from the employee, the most of the warm de online and then the collecte din ferite decimal pending on the decal points of the door ons showed up shows in the Open The Functions Wired the following face in the program int validinti string prompt, int lower_bound, int upper_bound) The Functions Write and use the following functions in the program, int validInt( string prompt, int lower_bound, int upper_bound) This function gets an integer value from the user that is within a specific range. It takes three segmente a string that is used as a prompt to the user to indicate what should be entered in integer that represents the smallest integer value that can be entered, and an integer that represent the largest integer value that can be entered. It turns an interper the integer value that is within the specific range, The function should display the string argument and the two inteper values to the mer and then get the user's value. A loop should be used to verify the ser value. As long as the weeters a value that is not with specified range, an error message should be displayed and the user should be given a chance to re-enter the value. Once the une enter a valid Vali, it should be retumed to the catter As an example of how this functice might be used - in previous programs to pet an inteper valse from the ser that is between 10 and 99, there might have been something like enot eetter 2 digitee 110...99 In this program, the above coulin statement should be replaced with veldig br. 16 which should produce a prompt similar to Intet a 2 (10...993 The school fortsat of how the prompt and specifieringene specified is leh up you, but the display MUST include the double validDouble string prompt, double lower_bound, double upper_bound) This function is the validis, except that it was with double Vahes rather than weer salues double grossPay( double wage, int hours_worked) This functie de nummerple's rostfree weeks to a double that they were that the botton that the employee worked for eveok teretum a double the calculated grow payment met The maximum number of homes that an employee can work before they start to an event is to be. If the aber al bou worked in less than or equal to the crowyment and one arty wapeles the umber of hours worked the number of how presterton, the propeen must also does the bourly wapeplus 3 meshurly war her very vera double federal Tax( double gross pay, int num_exemptions) In function and resten af det income to winy. We are the player and an enthal double federalTax( double gross_pay, int num_exemptions) This function calculates and returns the amount of federal income tax to whold from an employee, kes two woment a double that presents the employee's press payment amount and an integer argument that represents the number of exemptions claimed by the employee runs a double the amount of federal tax to withholl. The federal withholding allowance for a weekly pay period is 555.77 The amount of the employee's po pay that is subject to federal action is equal to the employees rous payment moms he federal withholding allowance times the number of exem)The amount subject to an is then used to calculate the federal income tax to withhold. The word withhold can be doing the following the object can to withheld X 15 55tI9552 855311116 $1194

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 2 Lnai 6322

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215882X, 978-3642158827

More Books

Students also viewed these Databases questions