Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!