Assesment form 5:
LA5.S10.1
Apply Program Development Phases To Develop A ProblemSolving Program
Sample Projects
for LA5.S10.1
1.
Write a simple
program to calculate the area of a triangle. Your program should allow the user
to key in the base and height of the triangle. Use a formula to calculate and
display the area of the triangle.
2.
Write a simple program to calculate the area of a circle.
Your program should allow the user to key in the radius of the circle. Use a
formula to calculate and display the area of the circle.
3.
Write a simple program to calculate the area of a rectangle.
Your program should allow the user to key in the length and width of the
rectangle. Use a formula to calculate and display the area of the rectangle.
4.
Write a simple program to calculate the volume of a pyramid.
Your program should allow the user to key in the length, width and height of
the pyramid. Use a formula to calculate and display the volume of the pyramid.
5.
Write a simple program to calculate the volume of a sphere.
Your program should allow the user to key in the radius of the sphere. Use a
formula to calculate and display the volume of the sphere.
6.
Write a simple program to calculate the volume of a cuboid.
Your program should allow the user to key in the length, width and height of
the cuboid. Use a formula to calculate and display the volume of the cuboid.
7.
Write a program to find the total and average of three
numbers.
8.
Write a program to find the total, difference and average of
two numbers.
9.
Write a program to calculate the price of an item after
discount. The user will key in the price and percentage discount. The program
will calculate and display the discount given and the actual amount to be paid.
10.
Write a program to calculate the price of an item after
discount. The user will key in the price and percentage discount. The program
will calculate and display the actual amount to be paid.
11.
Write a program to calculate the body mass index (BMI). The
user will key in the weight and height of a person. The program will display
the BMI and whether the person is underweight, normal, overweight or obese.
12.
Write a program to calculate the body mass index (BMI). The
user will key in the weight and height of a person. The program will display
the BMI.
13.
Write a program to allow a user to guess a hidden number by
entering any number. The program will inform the user if the number entered is greater
than, less than or equals to the hidden number.
14.
Indra Sdn Bhd is a company that manages the parking lots at
Bukit Puteri Resort. Vehicles parked are
charged based on the following :
a.
1^{st} half hour : RM0.20
b.
2^{nd} half hour : RM0.50
c.
subsequent half hour : RM0.80
To improve the efficiency
at the payment counters, you are asked by Indra Sdn Bhd to develop a program to
calculate the total parking charges based on the time of entry and time of
departure of each vehicle.
15.
Happy Supermarket will be holding an annual sale in
twomonth time. Discount will be given
to customers based on the amount they spent. The discount is as given in the
following table.
Amount
Spent (RM)

Entitled
Discount

100 to 200

5
%

More than 200 to 400

10
%

More than 400

15
%

Table
1
Your task is to build a
program to calculate the amount of money the customer has to pay after
discount. The program will display the
amount spent by the customer, percentage discount given, the actual discount
and the amount to be paid.
16.
A book salesman at Syarikat Blue East will receive a basic
pay of RM500.00 per month. Based on the sale, they will get commission on
number of books sold. The commission is based on Table 2:
Number
of books sold

Commission
(RM) per book

200 and below

0.20
0.30

More than 200

0.35

Table 2
According to the number
of book sold, you are request to develop a program to calculate the salary for
each salesman.