0% found this document useful (0 votes)
73 views1 page

Assignment3 Selection

The document outlines 3 tasks for an assignment on selection structures in programming: 1) Write a program to calculate commission for a salesperson based on their sales amount using a commission rate table. 2) Develop a program to calculate ticket prices for a musical theater based on seat location and number of tickets using one-letter codes, prompting the user for necessary information. 3) Create a program to determine if an applicant qualifies to be a policeman/policewoman by checking that they meet the criteria of age, physical requirements based on gender, and maximum BMI, stating the reason if unqualified.

Uploaded by

zzatiee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views1 page

Assignment3 Selection

The document outlines 3 tasks for an assignment on selection structures in programming: 1) Write a program to calculate commission for a salesperson based on their sales amount using a commission rate table. 2) Develop a program to calculate ticket prices for a musical theater based on seat location and number of tickets using one-letter codes, prompting the user for necessary information. 3) Create a program to determine if an applicant qualifies to be a policeman/policewoman by checking that they meet the criteria of age, physical requirements based on gender, and maximum BMI, stating the reason if unqualified.

Uploaded by

zzatiee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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)
Above 10,000
5,000 to 10,000
Below 5,000

Commission Rate(%)
10.0
7.5
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
Box
Pavilion
Bench
Lawn

Ticket Prize (RM)


200
150
75
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:
Gender
Male (M)
Female (F)

Height
1.63m and above
1.57m and above

Weight
Minimum 50kg
Minimum 48kg

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.

You might also like