Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how does this look in raptor? # Declare variables name: String hoursWorked: Real payRate: Real regularPay: Real overtimePay: Real grossPay: Real taxWithholding: Real netPay: Real

how does this look in raptor? # Declare variables
name: String
hoursWorked: Real
payRate: Real
regularPay: Real
overtimePay: Real
grossPay: Real
taxWithholding: Real
netPay: Real
parkingCost: Real =10.0
# Input employee name
input "Enter employee name: ", name
# Input and validate hours worked
repeat
input "Enter hours worked (must be more than 0): ", hoursWorked
until hoursWorked >0
# Input and validate pay rate
repeat
input "Enter pay rate (between $7.50 and $40): ", payRate
until payRate >=7.5 and payRate <=40
# Calculate regular pay
regularPay = hoursWorked * payRate
# Calculate overtime pay (if applicable)
if hoursWorked >40
overtimeHours = hoursWorked -40
overtimePay = overtimeHours *(1.5* payRate)
else
overtimePay =0
# Calculate gross pay
grossPay = regularPay + overtimePay
# Calculate tax withholding (30% of gross pay)
taxWithholding =0.3* grossPay
# Calculate net pay
netPay = grossPay - taxWithholding - parkingCost
# Display heading
output "**** ACWIE corporation ******"
# Display employee information
output "Employee Name:", name
output "Hours Worked:", hoursWorked
output "Pay Rate: $", payRate
output "Regular Pay: $", regularPay
output "Overtime Pay: $", overtimePay
output "Gross Pay: $", grossPay
output "Tax Withholding: $", taxWithholding
output "Parking Cost: $", parkingCost
output "Net Pay: $", netPay
# Check for ALERT 1
if netPay <450
output "ALERT 1"
end

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

Step: 3

blur-text-image

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

Get Funded The Startup Entrepreneurs Guide To Seriously Successful Fundraising

Authors: John Biggs, Eric Villines

1st Edition

1260459063, 978-1260459067

Students also viewed these Databases questions