The document outlines the requirements and instructions for a practical examination in Programming using C++ for the National Certificate in Information Technology in Zimbabwe. It includes various programming tasks that candidates must complete, such as writing programs for specific outputs, calculating costs, and handling user input based on certain criteria. The examination lasts for three hours and requires candidates to submit both hard and soft copies of their work.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
10 views3 pages
Programming Using C++ (Practical)
The document outlines the requirements and instructions for a practical examination in Programming using C++ for the National Certificate in Information Technology in Zimbabwe. It includes various programming tasks that candidates must complete, such as writing programs for specific outputs, calculating costs, and handling user input based on certain criteria. The examination lasts for three hours and requires candidates to submit both hard and soft copies of their work.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
ZIMBABWE
MINISTRY OF HIGHER AND TERTIARY EDUCATION,
INNOVATION, SCIENCE AND TECHNOLOGY DEVELOPMENT
HIGHER EDUCATION EXAMINATIONS COUNCIL
(HEXCO)
NATIONAL CERTIFICATE
IN
INFORMATION TECHNOLOGY
SUBJECT: Programming using C++ PER NO: 317/18/S02B
(Practical)
DURATION: 3 hours
[ MARCH/APRIL 2022 EXAMINATION
REQUIREMENTS
1. Computer with C+ + compiler.
2. Storage medium for each candidate.
3. Printing facility.
INSTRUCTIONS TO CANDIDATE
1. Answer all questions.
2. Print both code an
3. Submit both hard copy and soft copy.
This paper consists of 3 printed pages.PAPER NO: 317/18/s0913 PROGRAMMING USING c + (PRACTICAL)
QUESTION 1
a) Write a C+ + program that Produces the following output using a single cout
statement,
“Beware of bugs in the above code
Thave only proved it not tried iu” (7 marks)
») A farmer has had a good harvest this season. He plans on setting up a Mahou |
Processing plant at his farm. He intends to buy a tank to use for the storage
i on that the tank costs $50 per m!, write a Program that
tank from the user and calculates and |
displays the cost of the tank. ‘The vohime of the tank is calculated by the
formula mréh. (12 marks) |
a) Write a program that allows th:
Program displays the area/pla
following criteri
¢ user to enter their age and sex and the
‘cc where the person can work based on the
~ Females can work in urban areas only.
~ Males form 18 years to 50 years old can work anywhere,
7 Males from 51 years to 65 years old can work in vr
‘ban areas only.
~ Any other input will be treated as an error,
(15 marks)
») Write a program that allows the user to enter inte,
Enters 1. The program then displays the total n
entered by the user.
"ger numbers until he/she
umber of negative numbers |
(12 marks) |PAPE
R NO: 317/18/S02B - PROGRAMMING USING CF (PRACTICAL)
ON 3
a) Develop a program that stores the names, account numbers and account
balances of 6 employees. Your program adds 5% interest to all employees with
$1 000 or more in their accounts and displays the details of all account
holders in the following format,
Account Number Name Account Balance
6346889 ‘Tavonga $406.25
(15 marks)
») Create a file using Notepad, then write a program that finds and displays the
number of characters in the text file together with the contents of the file.
(14 marks}
QUESTION 4
@) Write a program that calculates and displays the area of a rectangle and
triangle using function overloading. Use a function prototype for the function
to calculate the area of the rectangle. (15 marks)
b)
Write a program that calculates and displays the
entered by the user. Your program should use a
to calculate the average
average.
average of three integers
class with two methods, one
and the other to display the three integers and their
(10 marks)
Af