You are on page 1of 8

CLO2P (25)

TOTAL /25
RETURN DATE
*For PK(Lecturer) use only

DEPARTMENT OF INFORMATION AND COMMUNICATION TECHNOLOGY


COURSEWORK ASSESSMENT (Session: 1 2022/2023)

Name :THARSHINI A/P MURUGIAIA Reg. No. :


21DDT22F2003
Code&Course : DFC 20113 / PROGRAMMING Programme/ Class : DDT2A
FUNDAMENTALS
Lecturer(s) : ASNIDATUL ADILAH ISMAIL Week (Date)

Submission Date :
LAB TASK No. : 1 / 2 / 3 /4 / 5 [CLO: CLO2P] Duration : 120 Minutes

COURSE LEARNING OUTCOME:


CLO2P: Show simple program by developing code to solve problems in a computer using C++
programming language.

Instruction: Answer ALL the questions below. [TOTAL MARKS=20]

1. Write a C++ program to calculate the average of five test scores. Prompt the user to
input each test score and then calculate and display the average score. Additionally,
provide feedback on whether the average score is above, below, or equal to the
passing grade, which is set at 60. Output should be as Figure 1 and 3 below.[P2]
[20 Marks]

Prepared by; Checked by; Verified by;

NURHANI BINTI MOHD SABRI


KETUA PROGRAM DDT
(NURHANI BINTI MOHD
Jabatan Teknologi Maklumat &SABRI)
Komunikasi Politeknik Balik Pulau
(ASNIDATUL ADILAH ISMAIL) (ASNIDATUL ADILAH ISMAIL) (Cop Jawatan Ketua Jabatan /Ketua
Course Lecturer Course Coordinator Program/Ketua Kursus)

Date: 3 Oktober 2023 Date: Date: 6 Oktober 2023


3 Oktober 2023
Figure 1

Figure 2

ANSWER :
2. Write a C++ program that simulates a simple menu-driven calculator. The program
should continuously display a menu with options for addition, subtraction,
multiplication, and division. The user can choose an operation by entering a
corresponding number (e.g., 1 for addition, 2 for subtraction, etc.). After each
operation, the program should ask the user if they want to perform another calculation.
If the user selects 'yes,' the program continues; otherwise, it exists. Use a do-while loop
for the menu and incorporate a switch statement to perform the selected operation. The
program should produce output as given below. [P3]
[20 Marks]
Figure 3

Figure 4

ANSWER:
RUBRIC
Question 1
CLO Criteria Exceptional Acceptable Amateur Unsatisfactory Unsolved
(5) (4) (3) (2) (1)
Use The C++ program The C++ The C++ The C++ The C++
Function isable to program programis program is program is
use 100% is able to able touse able to use less able to use less
use more morethan than than
function than 70% 50%
50% function 10% function
correctly. function. function.
CLO Program The C++ More than More than Less than 50% Program is
2 program is 75% 50% programis wrong andand
excellently program is program is correct and not
correct and correct and correct and working. working.
working. working. working.

Output Output meets Output meets More than Less than Output does
or exceeds requirement 75% output 50% output not meet
the meets meet requirement
requirement requirement requirement

Comment Clearly write Write more Write more Write less than Write less than
100% than 70% than 50% 20% comments 10% comments
comments of comments comments of ofthe C++ ofthe C++
the C++ of the C++ the C++
program. program. program. program. program.

Question 2
CLO Criteria Exceptional Acceptable Amateur Unsatisfactory Unsolved
(5) (4) (3) (2) (1)
Use The C++ program The C++ The C++ The C++ The C++
Function isable to program programis program is program is
use 100% is able to able touse able to use less able to use less
use more morethan than than
function than 70% 50%
50% function 10% function
correctly. function. function.
. .
CLO
2
Program The C++ More than More than Less than 50% Program is
program is 75% 50% programis wrong andand
excellently program is program is correct and not
correct and correct and correct and working. working.
working. working. working.
Output Output meets Output meets More than Less than Output does
or exceeds requirement 75% output 50% output not meet
the meets meet requirement
requirement requiremen requirement
Comment Clearly write Write more Write more Write less than Write less than
100% than 70% than 50% 20% comments 10% comments
comments of comments comments of ofthe C++ ofthe C++
the C++ of the C++ the C++
program. program. program. program. program.

You might also like