assignment3 selection

1
Assignment 3 (Selection) DUE WEEK 8 During Lab Task 1 ABC Corporation pays commission based on the amount of sales made. The commission rate is as shown in the following table: Sales (RM) Commission Rate(%) Above 10,000 10.0 5,000 to 10,000 7.5 Below 5,000 5.0 Write a program that calculates and display the commission for a salesperson. Task 2 The ticket price of a musical theater is based on the seat location as shown in the following table. Seat Location Ticket Prize (RM) Box 200 Pavilion 150 Bench 75 Lawn 35 Develop a program to calculate and display the ticket price for a customer. The program should calculate the ticket price base on the seat location and the number of tickets required. Use suitable one letter code for the seat location, e.g. ‘B’ for Box, ‘P’ for Pavilion etc. Be sure to prompt the user with enough information. Task 3 Applicants applying for a post as policeman/policewomen must fulfill the following criteria: 1. Age between 21-35 2. The physical qualification: 3. The Body Mass Index (BMI) for all gender must be less than 25.0 * BMI Formula: weight (kg) / (height (m)) 2 Develop a program to determine whether the applicant is qualified to apply or not. State the reason, if the candidate does not qualified. Check the criteria following the above order (age, physical and bmi). If the applicant does not meet the first criteria (age), your system does not have to check for the rest of the criteria. Gender Height Weight Male (M) 1.63m and above Minimum 50kg Female (F) 1.57m and above Minimum 48kg

Upload: zzatiee

Post on 09-Jul-2016

214 views

Category:

Documents


2 download

DESCRIPTION

csc

TRANSCRIPT

Assignment 3 (Selection) DUE WEEK 8 – During Lab Task 1 ABC Corporation pays commission based on the amount of sales made. The commission rate is as shown in the following table: Sales (RM) Commission Rate(%) Above 10,000 10.0 5,000 to 10,000 7.5 Below 5,000 5.0 Write a program that calculates and display the commission for a salesperson. Task 2 The ticket price of a musical theater is based on the seat location as shown in the following table. Seat Location Ticket Prize (RM) Box 200 Pavilion 150 Bench 75 Lawn 35 Develop a program to calculate and display the ticket price for a customer. The program should calculate the ticket price base on the seat location and the number of tickets required. Use suitable one letter code for the seat location, e.g. ‘B’ for Box, ‘P’ for Pavilion etc. Be sure to prompt the user with enough information. Task 3 Applicants applying for a post as policeman/policewomen must fulfill the following criteria: 1. Age between 21-35 2. The physical qualification:

3. The Body Mass Index (BMI) for all gender must be less than 25.0 * BMI Formula: weight (kg) / (height (m))2 Develop a program to determine whether the applicant is qualified to apply or not. State the reason, if the candidate does not qualified. Check the criteria following the above order (age, physical and bmi). If the applicant does not meet the first criteria (age), your system does not have to check for the rest of the criteria.

Gender Height Weight

Male (M) 1.63m and above Minimum 50kg

Female (F) 1.57m and above Minimum 48kg