Monday, December 6, 2010

KK12-

LA5.S10.1 Apply Program Development Phases To Develop A Problem-Solving Program

Practical session


Problem Analysis

a. Write the problem statement.
b. List all required input items.
c. Write the expected output.
d. Write the formula to be used.

Program Design
a. Write the pseudocode.
OR
Draw the flowchart.
b. Sketch the user interface design for input.
c. Sketch the user interface design for output.

Coding
a. Develop interface based on the design in 2(b) and 2(c).
b. Submit a softcopy of the program.
State the location of the saved program.

Testing and Debugging
a. Write down the data used for each input item listed in 1(b).
b. Write down output based on 4(a).
c. Compile the program.
Write down name of executable file.

Documentation
a. Submit report

----------------------------------------------------------------------------------------

Question :


1. Indra Sdn. Bhd. is a company that manages the parking lots at Bukit Puteri Resort.
Vehicles parked are charged based on the following :

a. 1st half hour : RM0.20
b. 2nd 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.

2. Happy Supermarket will be holding an annual sale in two-month time. Discount will be
given to customers based on the amount they spent. The discount is as given in the
following table.



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.

3. 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:



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

4. Write a simple program to calculate the area of a triangle. Your program should allow the
user to key in the length and height of the triangle. Use a formula to calculate and display
the area of the triangle.

5. 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.

6. 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.

7. 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.

8. 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.

9. Write a simple program to calculate the volume of a cuboids. Your program should allow
the user to key in the length, width and height of the cuboids. Use a formula to calculate
and display the volume of the cuboids.

10. Write a program to find the total and average of three numbers.

11. Write a program to find the total, difference and average of two numbers.

12. 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.

13. 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.

14. 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.

15. 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.

16. 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.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.