(SEM V) THEORY EXAMINATION 2021-22 OBJECT ORIENTED SYSTEM DESIGN

B.Tech Engineering 0 downloads
₹29.00

SECTION–A (2 Marks Each)


a) Link vs Association

Association shows a relationship between two classes (e.g., Teacher–Student).

Link is an actual instance of an association (e.g., Mr. Sharma teaches Rahul).


b) Abstract Class

An abstract class is a class that contains at least one pure virtual function.
Yes, an abstract class can be inherited, but the derived class must implement all abstract methods.


c) State Diagram of Electric Bulb

States:

OFF → Switch ON → ON

ON → Switch OFF → OFF


d) Protected Visibility Specifier

Used when class members should be accessible inside the class and its derived classes, but not outside.


e) Inline Function

A function is made inline when it is small and frequently used.
It reduces function call overhead and improves performance.


f) Destructor

A destructor is a special function used to free memory and resources when an object is destroyed.


g) Scope Resolution Operator (::)

Used to access:                                       Global variables

Class methods outside the class             Static class members


h) Candidate Key

A candidate key is a minimal attribute that can uniquely identify a record in a table.


i) Friend Function

A friend function can access private and protected members of a class without being its member.


j) Information Hiding

It means restricting direct access to object data and exposing only necessary details.


SECTION–B (Attempt Any Three – 10 Marks Each)


a) Constructor & Constructor Overloading

A constructor is a special function that initializes objects.


Characteristics

Same name as class             No return type                 Automatically called

Constructor Overloading Example

 

class Demo { public:    Demo() {        cout << "Default Constructor";    }    Demo(int x) {        cout << "Parameterized Constructor";    } };

b) Inline Function

Inline functions reduce execution time by avoiding function calls.

 

inline int square(int x) {    return x * x; }


c) Object Oriented Programming (OOP)

OOP organizes programs using objects and classes.

Advantages

Code reusability                  Security                   Easy maintenance

Prime Number Program Using Class

 

class Integer { public:    void printPrime(int n) {        for(int i=2;i<n;i++) {            bool prime=true;            for(int j=2;j<i;j++) {                if(i%j==0) prime=false;            }            if(prime) cout<<i<<" ";        }    } };


d) Basic Concepts of OOP

Class                    Object             Encapsulation            Inheritance

Polymorphism             Abstraction


e) Inheritance

Inheritance allows one class to acquire properties of another.


Types

Single                     Multiple

Multilevel               Hierarchical

Hybrid


Multiple Inheritance Example

 

class A { }; class B { }; class C : public A, public B { };


SECTION–C (10 Marks)

Polymorphism

Ability of one function to behave differently.

Compile Time

Function overloading              Operator overloading

Run Time

Function overriding                Virtual functions


Operator Overloading Example

 

class Test { public:    int x;    Test operator+(Test t) {        Test temp;        temp.x = x + t.x;        return temp;    } };


SECTION–D

Farmer–Goat–Lion–Grass Problem

Safe Steps

Take goat across                            Return alone

Take grass across                           Bring goat back

Take lion across                             Return alone

Take goat across

(Event trace diagram explanation can be written step-wise in exam)


Multiplicity & Quantification

Multiplicity defines number of objects in relation (1..1, 1..*, etc.)

Example: One teacher teaches many students


SECTION–E

UML

UML is a visual modeling language used to design systems.

Building Blocks

Things                        Relationships                     Diagrams


Types of Things

Structural                                          Behavioral

Grouping                                          Annotational

Virtual Base Class                           Used to avoid ambiguity in multiple inheritance.

 

class A { }; class B : virtual public A { }; class C : virtual public A { }; class D : public B, public C { };


SECTION–F

Type Conversion

Implicit: Done automatically by compiler

Explicit: Done manually using casting

Generalization, Aggregation & Association

Generalization: IS-A relationship

Aggregation: HAS-A (weak)

Association: Logical connection

SECTION–G

Friend Function Example

 

class Test {    int x; public:    friend void show(Test); }; void show(Test t) {    cout << t.x; }

This Pointer                       Refers to the current object.


Array of Objects               class Student { }; Student s[5];

File Size
137.8 KB
Uploader
SuGanta International
⭐ Elite Educators Network

Meet Our Exceptional Teachers

Discover passionate educators who inspire, motivate, and transform learning experiences with their expertise and dedication

KISHAN KUMAR DUBEY

KISHAN KUMAR DUBEY

Sant Ravidas Nagar Bhadohi, Uttar Pradesh , Babusarai Market , 221314
5 Years
Years
₹10000+
Monthly
₹201-300
Per Hour

This is Kishan Kumar Dubey. I have done my schooling from CBSE, graduation from CSJMU, post graduati...

Swethavyas bakka

Swethavyas bakka

Hyderabad, Telangana , 500044
10 Years
Years
₹10000+
Monthly
₹501-600
Per Hour

I have 10+ years of experience in teaching maths physics and chemistry for 10th 11th 12th and interm...

Vijaya Lakshmi

Vijaya Lakshmi

Hyderabad, Telangana , New Nallakunta , 500044
30+ Years
Years
₹9001-10000
Monthly
₹501-600
Per Hour

I am an experienced teacher ,worked with many reputed institutions Mount Carmel Convent , Chandrapu...

Shifna sherin F

Shifna sherin F

Gudalur, Tamilnadu , Gudalur , 643212
5 Years
Years
₹6001-7000
Monthly
₹401-500
Per Hour

Hi, I’m Shifna Sherin! I believe that every student has the potential to excel in Math with the righ...

Divyank Gautam

Divyank Gautam

Pune, Maharashtra , Kothrud , 411052
3 Years
Years
Not Specified
Monthly
Not Specified
Per Hour

An IIT graduate having 8 years of experience teaching Maths. Passionate to understand student proble...

Explore Tutors In Your Location

Discover expert tutors in popular areas across India

Harmonium Classes Near Sushant Lok Phase 1 – Learn Classical Music with Confidence Sushant Lok Phase 1, Gurugram
Low Investment Business Opportunities Near By Kirti Nagar Start Small, Grow Smart & Build Profitable Ventures with Minimal Capital Kirti Nagar, Delhi
Dance Classes (Bollywood, Hip-Hop, Classical) Near Sector 129 Greater Noida – Learn, Express, and Stay Fit Through Dance Noida
Tailoring & Stitching Classes Near By Dwarka Mor – Learn Professional Sewing Skills Dwarka Mor, Delhi
Guitar Classes Near Central Noida Sector 1 – Learn Guitar with Expert Trainers Noida
Prenatal Yoga Training Near Uppal Southend, Gurugram – A Calm & Healthy Pregnancy Journey Uppal Southend, Gurugram
Spoken English Classes Near By Paschim Vihar Improve Fluency, Build Confidence & Unlock Better Career Opportunities in 2026 Paschim Vihar, Delhi
Graphic Designing Course Near Sector 61 Gurugram – Build Creative Skills & Start Your Design Career Gurugram
Guitar Classes Near DLF Phase 1 – Learn Guitar from Expert Teachers DLF Phase I, Gurugram
UI/UX Designing Classes Near By Kirti Nagar – Build a Creative Tech Career Kirti Nagar, Delhi
Zumba Classes Near Malviya Nagar – Dance Your Way to Fitness & Confidence Malviya Nagar, Delhi
Spoken English Classes Near By Sarita Vihar Improve Fluency, Build Confidence & Unlock Career Opportunities in 2026 Sarita Vihar, Delhi
German Language Classes Near Sector 118 Noida – Learn German with Expert Trainers Noida
No Office Rent Business Setup Near Najafgarh Start & Grow Your Business Without Paying High Office Rent in 2026 Najafgarh, Delhi
App Development Classes Near Noida Sector 102 – Complete Guide to Build Your Career in Mobile App Development Noida
Harmonium Classes Near Sector 141 – Learn Classical & Devotional Music Professionally Noida
Spoken English Classes Near By Malviya Nagar Build Confidence, Improve Fluency & Unlock Career Opportunities in 2026 Malviya Nagar, Delhi
IELTS Coaching Near Noida Sector 105 – Complete Guide for Students Preparing for Study Abroad Noida
Spoken English Classes Near By Defence Colony Improve Communication Skills, Confidence & Career Opportunities in 2026 Defence Colony, Delhi
Spoken English Classes Near Sector 117 Noida – Improve Fluency, Confidence and Communication Skills Noida
⭐ Premium Institute Network

Discover Elite Educational Institutes

Connect with top-tier educational institutions offering world-class learning experiences, expert faculty, and innovative teaching methodologies

Réussi Academy of languages

sugandha mishra

Réussi Academy of languages
Madhya pradesh, Indore, G...

Details

Coaching Center
Private
Est. 2021-Present

Sugandha Mishra is the Founder Director of Réussi Academy of Languages, a premie...

IGS Institute

Pranav Shivhare

IGS Institute
Uttar Pradesh, Noida, Sec...

Details

Coaching Center
Private
Est. 2011-2020

Institute For Government Services

Krishna home tutor

Krishna Home tutor

Krishna home tutor
New Delhi, New Delhi, 110...

Details

School
Private
Est. 2001-2010

Krishna home tutor provide tutors for all subjects & classes since 2001

Edustunt Tuition Centre

Lakhwinder Singh

Edustunt Tuition Centre
Punjab, Hoshiarpur, 14453...

Details

Coaching Center
Private
Est. 2021-Present
Great success tuition & tutor

Ginni Sahdev

Great success tuition & tutor
Delhi, Delhi, Raja park,...

Details

Coaching Center
Private
Est. 2011-2020