You are on page 1of 3

CSC402 PROGRAMMING I

ASSESSMENT 1 (INDIVIDUAL ASSIGNMENT)

Instruction: Answer the following questions.

QUESTION 1

A student has designed an object as shown in the figure below. You need to calculate the area
of all the objects, based on the length and the width of the rectangle by the user, as well as the
height of the triangle.

a) Define the problem by constructing a problem analysis. Draw the IPO table.
(10 marks)
b) Create a solution algorithm using pseudocode.
(9 marks)
c) Write C++ program.
(15 marks)

DR. NAHDATUL AKMA AHMAD 1


CSC402 PROGRAMMING I

QUESTION 2

The electricity company provides a discount on power consumption. You should calculate your
electric bill using the rates outlined in the table below.

Usage Rate
0 – 999 KWH RM0.60
1000 – 1499 KWH RM0.45
1500 – 1999 KWH RM0.40
2000 and above RM0.35

Create a solution algorithm using flowchart.


(10 marks)

QUESTION 3

Convert from Malaysian Ringgit (RM) amounts to Japanese Yen and to Jordanian Dinar. The
conversion values to use are:
1 RM = 31.35 Yen 1 RM = 0.15 Jordanian Dinar

a) Define the problem by constructing a problem analysis. Draw the IPO table.
(7 marks)
b) Create a solution algorithm using flowchart.
(8 marks)
c) Write C++ program.
(8 marks)

QUESTION 4

Determine whether a number entered by the user is positive, negative, or zero.

a) Define the problem by constructing a problem analysis. Draw the IPO table.
(10 marks)
b) Create a solution algorithm using pseudocode.
(8 marks)

DR. NAHDATUL AKMA AHMAD 2


CSC402 PROGRAMMING I

QUESTION 5

A user will enter a numeric value for minute. Convert the entered number of minutes into hours
and minutes.

For example, if minute entered is 135, the answer will be "2 hours and 15 minutes."

a) Define the problem by constructing a problem analysis. Draw the IPO table.
(7 marks)
b) Create a solution algorithm using pseudocode.
(5 marks)
c) Write C++ program.
(3 marks)

Note:
Total mark: 20%
Submission due date: Week 5 ( 2 November 2023) via Google Classroom

DR. NAHDATUL AKMA AHMAD 3

You might also like