0% found this document useful (0 votes)
5 views2 pages

CP Assignment 2

The document outlines an individual assignment for a Computer Programming course, due on May 3rd, 2025, worth 10 marks, with zero tolerance for plagiarism. It requires students to write C++ programs for two problems: an Electricity Bill Calculator that applies specific tariffs and surcharges, and a Student Grade Report that calculates total and average marks to assign grades. Both programs must utilize sequence, selection, and repetition constructs, with proper documentation included.

Uploaded by

m.moosa.hrn
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)
5 views2 pages

CP Assignment 2

The document outlines an individual assignment for a Computer Programming course, due on May 3rd, 2025, worth 10 marks, with zero tolerance for plagiarism. It requires students to write C++ programs for two problems: an Electricity Bill Calculator that applies specific tariffs and surcharges, and a Student Grade Report that calculates total and average marks to assign grades. Both programs must utilize sequence, selection, and repetition constructs, with proper documentation included.

Uploaded by

m.moosa.hrn
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

Computer Programming

BEE- 61 D

Assignment#: 2 [CLO 2, C3 – Apply]

1. Submission Guidelines:
a. The assignment has to be done individually. Deadline: Tuesday 3rd May 2025
b. The assignment is of 10 marks.
c. ZERO marks for plagiarism.

Instructions:

Write a program in C++ to solve the following two real-world problems. You must
demonstrate the use of sequence, selection, and repetition constructs in each problem. Include
proper comments and documentation.

Problem 1: Electricity Bill Calculator

Problem Statement:

Design a program that calculates the monthly electricity bill based on the following tariff:

 For the first 100 units: Rs. 5/unit


 For the next 100 units (101-200): Rs. 7/unit
 Above 200 units: Rs. 10/unit

If the total bill exceeds Rs. 1000, apply a surcharge of 10% on the total bill.

Requirements:

 Use sequence for input/output and calculations.


 Use selection to apply appropriate tariff and surcharge.
 Use repetition to allow the user to calculate bills for multiple customers.

Problem 2: Student Grade Report

Problem Statement:

Design a program that:

 Accepts marks of 5 subjects for a student.


 Calculates the total and average marks.
 Determines the grade based on the average:
o 90 and above: A+
o 80–89: A
o 70–79: B
o 60–69: C
o Below 60: F

Requirements:

 Use sequence to perform input and computations.


 Use selection to assign grades.
 Use repetition to input marks for multiple students.

BEST OF LUCK 

You might also like