CS201 MID TERM SOLVED MCQs || PAST PAPERS || GROUP-1 || INTRODUCTION TO PROGRAMMING || VuTech Visit Website For More Solutions www.vutechofficial.blogspot.com …
CS304P ASSIGNMENT NO. 1 FALL 2022 || 100% RIGHT SOLUTION || OBJECT ORIENTED PROGRAMMING (PRACTICAL) || BY VuTech
SEND WHATSAPP OR E-MAIL FOR ANY QUERY
0325-6644800
kamranhameedvu@gmail.com
Objective
The objective of this assignment is:
To give you the idea of practical implementation of the following concepts of the Object Oriented Programming (OOP):
·Access Specifiers, Data Members and Member Functions
·Access Functions
·Default and Parameterized Constructors
·Dynamic Memory allocation using new operator
Uploading instructions:
Your assignment should be in .CPP format (Any other formats like scan images, PDF, zip, doc, rar and bmp etc. will not be accepted).
Save your assignment with your ID (e.g. bc000000000.CPP).
No assignment will be accepted through email.
Rules for Marking:
It should be clear that your assignment will not get any credit if:
·The assignment is submitted after due date.
·The submitted assignment does not open, execute or file is corrupted.
·Your assignment is copied from internet, handouts or from any other student.
(Strict disciplinary action will be taken in this case).
Lectures Covered:
This assignment covers Lecture # 7-12.
Assignment No. 1
Virtual University of
Pakistan is an institute which offers technical and non-technical courses
based on the distance learning model where one can join any of the courses
just by using a computer system. Consider that you are enrolled in a course,
OOP (Object Oriented Programming) and you have been given a task to develop a
program in C++ which will take marks of different assessments as input and
displays total marks as an output.
Step by step
instructions:
·Write a C++ class name Student with the following
attribute: Student Id, Student name, quiz marks (for
4 quizzes), assignment marks (for 2 assignments), Mid Term Marks,
Final Term Marks, Total Marks
·Write a parameterized constructor which passes all the
data members of the Student class?
·Write an appropriate copy constructor for the student
class
·Write member functions for the following requirements:
Function Name
Description
enterData()
To input data from the user through console as mentioned in
the screenshot.
calculateResult()
To calculate the result according to the grading scheme.
displayData()
To print data on the screen as mentioned in the screenshot.
Grading Scheme:
Activity
Weightage
Number of activities
Formulation
Quiz
10%
4
* 10
Assignment
20%
2
* 20
Mid Term Exam
30%
1
* 30
Final Term Exam
40%
1
* 40
Perform the following tasks in main():
oCreate an array of size 3 of Student objects using new
operator
oInitialize the index [0] using parameterized constructor
oEnter data for the index [1] through enterData()
oCopy index[1] object into index [2] by using copy constructor
oDisplay all the Records by using displayData()
Note:
Apply all the validations
on the marks at the time of input mentioned in the screenshot.
After running your
program, the following screen should display.
Best
of luck!
NOTE: Do not put any query on MDB about this
assignment, if you have any query then email at cs304p@vu.edu.pk. Furthermore, if any student found
cheating from any other student or from online forums then he/she will be
awarded ZERO right away and strict disciplinary action will be taken against
the student.
Deadline: Your assignment must be
uploaded/submitted on or before December 05, 2022.
KINDLY, DON’T COPY PASTE
SUBSCRIBE, SHARE, LIKE AND COMMENTS FOR MORE UPDATES
SEND WHATSAPP OR E-MAIL FOR ANY QUERY
0325-6644800
kamranhameedvu@gmail.com
SOLUTION
#include <iostream>
#include <string.h>
#include <conio.h>
using namespace std;
class Student
{
public:
Student() {}
Student(string Student_Id, string Student_name, int quiz_marks1, int quiz_marks2, int quiz_marks3, int quiz_marks4, int assignment_marks1, int assignment_marks2, int Mid_Term_Marks, int Final_Term_Marks);
void enterData(string Student_Id, string Student_name, int quiz_marks1, int quiz_marks2, int quiz_marks3, int quiz_marks4, int assignment_marks1, int assignment_marks2, int Mid_Term_Marks, int Final_Term_Marks);
void calculateQuiz();
void calculateAssignment();
void calculateMidterm();
void calculateFinalterm();
void calculateTotalMarks();
void displayData();
Student(Student &obj)
{
this->Student_Id = obj.Student_Id;
this->Student_name = obj.Student_name;
this->quiz_marks1 = obj.quiz_marks1;
this->quiz_marks2 = obj.quiz_marks2;
this->quiz_marks3 = obj.quiz_marks3;
this->quiz_marks4 = obj.quiz_marks4;
this->assignment_marks1 = obj.assignment_marks1;
this->assignment_marks2 = obj.assignment_marks2;
this->Mid_Term_Marks = obj.Mid_Term_Marks;
this->Final_Term_Marks = obj.Final_Term_Marks;
}
};
Student::Student(string Student_Id, string Student_name, int quiz_marks1, int quiz_marks2, int quiz_marks3, int quiz_marks4, int assignment_marks1, int assignment_marks2, int Mid_Term_Marks, int Final_Term_Marks)
void Student::enterData(string Student_Id, string Student_name, int quiz_marks1, int quiz_marks2, int quiz_marks3, int quiz_marks4, int assignment_marks1, int assignment_marks2, int Mid_Term_Marks, int Final_Term_Marks)
We provide Virtual University of Pakistan Study Materials such as Solution of Assignments, GDBs, Mid Term Solved Papers, Final Term Solved Papers, Mid Term Solved MCQs, and Final Term Solved MCQs. We also provide regular Semester Quizzes, Updated Handouts, and Short Questions and Answers. We help you with your research and many other educational-related topics, as far as we know. Furthermore, Share your problem with us and Please feel free to ask any related questions.