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

Assignment 3

This document outlines the instructions for Assignment No. 03 for the Object Oriented Programming course at Muslim Youth University. It specifies submission guidelines, group work requirements, formatting rules, and the deadline for submission. The assignment includes questions related to multiple, hierarchical, and hybrid inheritance in C++, requiring definitions, program demonstrations, and explanations of inheritance concepts.

Uploaded by

hasimalikym15
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Assignment 3

This document outlines the instructions for Assignment No. 03 for the Object Oriented Programming course at Muslim Youth University. It specifies submission guidelines, group work requirements, formatting rules, and the deadline for submission. The assignment includes questions related to multiple, hierarchical, and hybrid inheritance in C++, requiring definitions, program demonstrations, and explanations of inheritance concepts.

Uploaded by

hasimalikym15
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Assignment No: 03

Department of Computer Science


Muslim Youth University, Islamabad

Course Code: CS- 102


Course Title: Object Oriented Programming

Instructions:
1. The assignment has
to be delivered as
hard copy (your
answer sheets) no
later
than the specified
deadline. Make sure
that you submit the
assignment during

1
the lecture hours on
specified.
2. The assignment is
to be submitted in
groups of 2 students,
copying someone
else's solution will lead
to a punishment,
i.e.,the one who
provides his/her
solution for copying
and the one who
copies, both will get
zero marks for the
2
copied part.
3. Your name and
regeiteration number
and class must be
written at the start of
assignment. This
carries 2 marks.
4. Your assignment
should be written
using MS word. Your
assignment should be
properly formatted.
Your assignment

3
carries 5 marks for
formatting.
5. Do not copy word-
for-word from any
source. Write in your
own words and
give proper references
with your work. Your
assignment carries 3
marks
for references.
Assignment No: 3
Instructions:
1. The assignment has to be delivered as soft copy (Google Classroom) no later than the
specified deadline.
2. copying someone else's solution will lead to a punishment, i.e., the one who provides
his/her solution for copying and the one who copies, both will get zero marks for the
copied part.
3. Your name and registration number must be written at the start of assignment.
4. Deadline for Submission of assignment is 08 Jan 2025.

4
Question No: 01
 Define multiple inheritance in C++.
 Write a C++ program to demonstrate multiple inheritance.
 Answer the following questions:

1. How does the derived class inherit properties from multiple base classes?
2. What is the output of your program?

Question No: 02

 Define hierarchical inheritance in C++.


 Write a C++ program to demonstrate hierarchical inheritance.
 Answer the following questions:

1. How do multiple derived classes inherit properties from a single base class?
2. What is the output of your program?

Question No: 03

 Define hybrid (virtual) inheritance in C++.


 Write a C++ program to demonstrate hybrid inheritance.
 Answer the following questions:

1. How is the "diamond problem" resolved using virtual inheritance in C++?


2. What is the output of your program?

You might also like