Assgnment No.1
Assgnment No.1
Sahiwal Campus
(Department of Computer Science)
Q.no.1. Write a class student with data members student name, roll no., semester no.,
course name, marks, grade and make them as private. Write member functions with
two constructors one must be parameterized that assigns values to the data members of
the class. One member function get_student_data() should get the student data from
the user. Display_quiz_grade() function should display the student’s grade according
to marks. You have to take three students’ data one from user and two from
constructors that initializes students’ data.
Output view
Enter student1 data
Enter student name = Fayez Afzaal
Enter roll no. = FA18-RCS-010-Section (A)
Enter semester no. = 2
Enter course name= OOP
Your marks is = 10
Your grade is = A
Course Title: Object Oriented Programming Course Code: CSC241 Credit Hours: 3+1
Course Instructor: M. Fayez Afzaal Programme Name: BSSE
Semester: 3rd Batch: SP-23 Section: C Date:
Time Allowed: Maximum Marks: 10
Student’s Name: Reg. No. CUI/ /SWL
Important Instructions / Guidelines:
Read the question paper carefully and answer the questions according to their statements.
Mobile phones are not allowed. Calculators must not have any data/equations etc. in their memory.
Page 1 of 1