ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 26 May 2017 My Price 11.00

programming style sheet on ANGEL.

Instructions:

Create a single script (.m file) to solve this problem. Unless directed otherwise, use meaningful variable names for each variable; do not use the default variable ans to store your results. Suppress your output for every calculation or allocation with a semi-colon; you may only use print commands to print output.

Please remember to follow the programming style sheet on ANGEL. When complete, please submit your code to the dropbox on ANGEL; the graders will run it to view your output. Name your file like this: username_lab6.m (example: bjs5332_lab6.m). Your submission must be a single .m file.

Problem 1 (10 points)

Permanent employees are generally classified under two different compensation schemes: wage payroll (“wage”) employees, and salaried employees. Wage employees receive an hourly rate for the time they work, and are eligible for overtime on the time they work over the specified “fulltime hours”. Salaried employees receive a fixed paycheck regardless of the number of hours worked; as such, they are ineligible for overtime.

Consider a company that compensates their wage employees as such:

Full-Time Hours: 40 Normal Hourly Rate: $23/hour Overtime Multiplier: 1.5 (for time over 40 hours)

Write a program that a payroll clerk could use to figure out the gross pay for their employees. Calculate the pay (printed only to 2 decimal places) for wage employees; include a notification if a wage employee will be receiving overtime pay. Since a salaried employee’s pay is fixed, there would be no reason to need to calculate it – a simple statement stating such to the user observing this fact will suffice. Prompt the user with a menu to choose “Wage Employee” or “Salaried Employee,” then use a switch to examine each of those cases as appropriate. Try to mirror the sample results I’ve included on the second page of this document.

Emulate the behavior of a do while loop in MATLAB to ensure the program runs at least once; the program should run until the user enters a sentinel value of −1. Only enter numbers when you check if the program should terminate. Hints: (1) For wage employees, overtime only applies to the time worked over the full-time hours. (2) do while loops are unavailable in MATLAB, but we discussed how to emulate their behavior in Lecture 16 using while loops. (3) Only enter numbers to check if the loop should stop, otherwise the program will yield errors when you check the stopping criteria. (4) You might find it useful to nest an if statement into one of your switch cases.

Sottile – Spring 2016

Sample Results:

Sample Menu:

Sample Run I/O:

How many hours did employee work?: 30 Gross pay is $690.00 Do you wish to continue? Enter -1 to terminate, otherwise the program will continue: 5 How many hours did employee work?: 50 Employee will receive overtime Gross pay is $1265.00 Do you wish to continue? Enter -1 to terminate, otherwise the program will continue: 2 Salaried employees don't enter hours! Do you wish to continue? Enter -1 to terminate, otherwise the program will continue: -1 Goodbye! Note: The selections on the menu needed to generate this output are: Wage Employee, Wage Employee, Salaried Employee

 

Sottile – Spring 2016CMPSC 200 Programming for Engineers with MATLABLab 6Instructions:Create a single script (.m file) to solve this problem. Unless directed otherwise, use meaningfulvariable names for each variable; do not use the default variableansto store your results.Suppress your output for every calculation or allocation with a semi-colon; you may only useprint commands to print output.Please remember to follow the programming style sheet on ANGEL. When complete, pleasesubmit your code to the dropbox on ANGEL; the graders will run it to view your output. Nameyour file like this:username_lab6.m(example:bjs5332_lab6.m). Your submissionmust be a single .m file.Problem 1(10 points)Permanent employees are generally classified under two different compensation schemes: wagepayroll (“wage”) employees, and salaried employees. Wage employees receive an hourly rate forthe time they work, and are eligible for overtime on the time they work over the specified “full-time hours”. Salaried employees receive a fixed paycheck regardless of the number of hoursworked; as such, they are ineligible for overtime.Consider a company that compensates their wage employees as such:Full-Time Hours: 40Normal Hourly Rate: $23/hourOvertime Multiplier: 1.5 (for time over 40 hours)Write a program that a payroll clerk could use to figure out the gross pay for their employees.Calculate the pay (printed only to 2 decimal places) for wage employees; include a notification ifa wage employee will be receiving overtime pay. Since a salaried employee’s pay is fixed, therewould be no reason to need to calculate it – a simple statement stating such to the user observingthis fact will suffice. Prompt the user with a menu to choose “Wage Employee” or “SalariedEmployee,” then use a switch to examine each of those cases as appropriate. Try to mirror thesample results I’ve included on the second page of this document.Emulate the behavior of ado whileloop in MATLAB to ensure the program runs at least once;the program should run until the user enters a sentinel value of−1. Only enter numbers whenyou check if the program should terminate.Hints: (1) For wage employees, overtime only applies to the time worked over the full-timehours. (2)do whileloops are unavailable in MATLAB, but we discussed how to emulate theirbehavior in Lecture 16 usingwhileloops. (3) Only enter numbers to check if the loop shouldstop, otherwise the program will yield errors when you check the stopping criteria. (4) Youmight find it useful to nest anifstatement into one of your switch cases.

Attachments:

Answers

(11)
Status NEW Posted 26 May 2017 08:05 AM My Price 11.00

-----------

Attachments

file 1495788559-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)