0% found this document useful (0 votes)
145 views

Assignment# 2: Riphah International University

This document contains an assignment for an object-oriented programming class. It describes five classes - University, Department, Laboratory, Professor, and Researcher - and their relationships. It also provides two case studies for drawing UML class diagrams, one involving managing quizzes and questions, and the other adding a question bank. Students are asked to draw UML class diagrams and implement the classes based on the specifications.

Uploaded by

sudaismalik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views

Assignment# 2: Riphah International University

This document contains an assignment for an object-oriented programming class. It describes five classes - University, Department, Laboratory, Professor, and Researcher - and their relationships. It also provides two case studies for drawing UML class diagrams, one involving managing quizzes and questions, and the other adding a question bank. Students are asked to draw UML class diagrams and implement the classes based on the specifications.

Uploaded by

sudaismalik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Riphah International University

Department of Software Engineering


Faculty of Computing

Object Oriented Programming


Spring 2021

Assignment# 2
Submission Date: 15th April 2021

Question 1 [5+5 = 10 marks]: Consider five classes i.e. Professor, Researcher, Department, Laboratory,
and University having following specifications.
Class University has  
 Two attributes of type string i.e. universityName and location
 An attribute named dept of type Department 

Class Department has 


 Two attributes i.e. deptID, deptName
 A two-argument constructor to initialize data fields with user-defined values
 A member function display() to show all attribute values

Class Laboratory contains


 Two attributes i.e. labID and  experimentNo
 A two-argument constructor to initialize data member with user-defined values

Class Professor has  


 A data field named profName of type string
 A data field named dept of type Department
 A two-argument constructor to initialize both attributes of user-defined values

Class Researcher has 


 A data field named profName of type string
 A data field named dept of type Department
 An attribute named lab of type Laboratory
 A constructor to initialize lab with user-defined value

You are required to perform the following tasks:


a. Draw UML Class Diagram for each class and show inheritance, aggregation, and composition
relationship between these classes.
b. Implement all these classes while illustrating the concept of aggregation and composition in terms of
ownership and life cycle. 
Riphah International University
Department of Software Engineering
Faculty of Computing

Question 2 [20 marks]: Draw UML Class Diagram for the following case study, Students
with odd sapid will also implement this case study:
You as a developer is requested to create a simple console-based application for teachers to
create quizzes for the students. Teacher just want to manage his/her quizzes and questions.
System should provide the functionality to add new quiz and then add some questions to
that quiz. All the questions would be MCQs. For each question, Teacher will store the
question number, question details, options of the question and the right option.
System should provide the functionality to manage all the quizzes, i.e., to view the quizzes,
to modify a quiz, to delete a quiz, print a quiz to PDF or Word file without the correct
answers.
Viewing a quiz means, view quiz details i.e., quiz created date, and number of questions.
User should also be able to view the questions in the quiz.
Modifying a quiz means, Modify quiz details i.e., quiz title, quiz date, etc.,. It also means that
user can add or delete questions in the quiz.
Deleting a quiz means, the quiz along with all the question inside it will be deleted.

Question 3 [20 marks]: Draw UML Class Diagram for the following case study, Students
with even sapid will also implement this case study:
You as a developer is requested to create a simple console-based application for teachers to
create quizzes for the students. Teacher just want to manage his/her quizzes and questions.
System should provide the functionality to add new quiz and then add some questions to
that quiz from the question bank. All the questions would be MCQs. For each question,
Teacher will store the question number, question details, options of the question and the
right option.
System should provide the functionality to manage all the questions in a question-bank, i.e.,
to view the questions, to modify a question, to delete a question.
System should also provide the functionality to manage all the quizzes, i.e., to view the
quizzes, to modify a quiz, to delete a quiz, print a quiz to PDF or Word file without the
correct answers.
Viewing a quiz means, view quiz details i.e., quiz created date, and number of questions.
User should also be able to view the questions in the quiz.
Modifying a quiz means, Modify quiz details i.e., quiz title, quiz date, etc.,. It also means that
user can add or delete questions in the quiz from the question bank.
Deleting a quiz means, the quiz along with all the question inside it will be deleted.

_________________________END_____________________________

You might also like