0% found this document useful (0 votes)
26 views3 pages

Assignment Question

This document outlines 5 questions for an individual programming assignment. The questions involve: 1) Calculating the area of geometric shapes given user input dimensions 2) Calculating an electricity bill based on usage tiers and rates 3) Converting currency amounts between Malaysian Ringgit, Japanese Yen, and Jordanian Dinar 4) Determining if a user-entered number is positive, negative, or zero 5) Converting a number of minutes entered by the user to hours and minutes. For each question, students are instructed to write problem analyses, algorithms (using pseudocode or flowcharts), and C++ programs. The assignment is due by November 2nd and is worth 20% of the student

Uploaded by

pandamalaya10
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)
26 views3 pages

Assignment Question

This document outlines 5 questions for an individual programming assignment. The questions involve: 1) Calculating the area of geometric shapes given user input dimensions 2) Calculating an electricity bill based on usage tiers and rates 3) Converting currency amounts between Malaysian Ringgit, Japanese Yen, and Jordanian Dinar 4) Determining if a user-entered number is positive, negative, or zero 5) Converting a number of minutes entered by the user to hours and minutes. For each question, students are instructed to write problem analyses, algorithms (using pseudocode or flowcharts), and C++ programs. The assignment is due by November 2nd and is worth 20% of the student

Uploaded by

pandamalaya10
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/ 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