CS3018 PL SET A 5to7
CS3018 PL SET A 5to7
CS3018 PL SET A 5to7
If the employee has worked for more than 10 years and has a rating of 5, they get a
bonus of 20% of their salary.
If the employee has worked for more than 10 years and has a rating of less than 5,
they get a bonus of 10%.
If the employee has worked for less than 10 years but more than 5 years and has a
rating of 5, they get a bonus of 15%.
If none of these conditions are met, they get no bonus.
Write a program that inputs the employee’s years of service, performance rating, and
salary, then calculates and displays the bonus of an employee as shown in Sample input
and output section.
B. An e-commerce website calculates shipping costs based on the type of product and
delivery speed. Products are classified into Electronics, Clothing, and Groceries. The
delivery speeds are Standard, Express, and Same-Day Delivery. The cost for each
product and delivery type is as follows:
Write a program that takes the product type and delivery speed as input and uses a switch
statement to calculate and display the total shipping cost.