American International University-Bangladesh
Department of Computer Science
Lab Exam (Code development), Summer, 2017
Programming Language 2 (cs)
Undergraduate course
Deadline: 2.3.2018 (2nd March, 2018) time: 10:00 AM
Format: midProject.txt
Submission email:
[email protected] Mail Subject: MidTerm_Project
Mail Body: Name, id and Section
Write a C++ program to solve the following task.
You must implement a simple Student information system. This system will do the followings: store
student information, print all student information.
(a) Write a Student class that will store student id, name, dept and gpa. This class should store gpa for 4
semesters. Write all necessary functions, e.g., constructor, setter and getter functions to store and
retrieve a student information. You also need to write a function named calculateCGPA() in the Student
class that will calculate the cgpa from the stored gpa and return it.
(b) In the main function ask user for how many students information he wants to store. Then use a loop
to take input from user and store information for the given number of students.
(c) Finally, print information for all the students in the following format:
Student id:
Student Name:
Student Department:
Student Gpas:
Student CGPA: