Spring 2023 - CS101 - 2
Spring 2023 - CS101 - 2
Introduction To Computing
(CS101) Deadline
Assignment No. 02 11th ofJuly, 2023
Spring 2023
Please carefully read the following instructions before attempting the assignment.
You should consult the recommended books to clarify your concepts if video lessons/handouts
are not sufficient.
Objectives:
NOTE
No assignment will be accepted after the due date via email in any case (whether it is the case
of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignments
in the last hour of the deadline. It is recommended to upload the solution file at least two days
before its closing date.
If you people find any mistake or confusion in the assignment (Question statement), please
consult with your instructor before the deadline. After the deadline , no queries will be
entertained in this regard.
Deciding the Final Grads of various students manually is a tedious and challenging task. Your job is to
develop a C++ program that should be capable of calculating the Total and Average Marks of a student.
Based on the above calculations the program should award the correct Final Grad to a student. Following
is the sample screenshot of the Input and Output of a student.
Working Mechanism:
The program should allow the users to enter their OWN VU-ID and any random marks for four subjects
CS, Math, Pak Study, and MGT. Then, the Total marks and Average Marks are calculated using
mathematical operators on variables for each subject. The program should use Control Structure “if or if-
else” and “Logical Operator(s)” to decide the final grad of a student based on the Average Marks. Also,
the following score limits should be implemented in your program to grant Correct grad to a student as
per the following upper and lower score bounds/limits. For example, if a student got Average Marks 86
then Grad “A- “should be awarded as present in the sample screenshot.
Write your code in a compiler application and run it to generate the output. After that copy your
code and paste it into a Microsoft Word document (your solution file). Also, take a screenshot of
your program’s output and paste it into the solution file along with the code.
You can use any online or offline C++ compiler for writing your code for the assignment solution. Few
links for the online compilers are given below:
https://www.onlinegdb.com/online_c++_compiler
https://www.w3schools.com/cpp/cpp_compiler.asp
Hint:
“cin>>” command is used in C++ programs to take some input from the user during the program
execution.
Note:
Your solution file must be a Microsoft Word document (in .doc or .docx file extension).
Solution file must contain both code and the output screenshot of your code. No marks will be
awarded in case any of these (code/output) is missing.
It is mandatory to use your own Student ID in the program (No marks will be awarded if the
student’s personal information is missing/copied or the VUID of some other student is used).