AD-305 · Object Oriented Programming & Methodology/Unsolved PYQ Paper
AD-305 Object Oriented Programming and Methodology - Jun 2025 Question Paper
Under each question, How to answer lists the points an answer should cover, outlined by CampusPrep from the syllabus. Check the details against your textbook.
-
7 MarksaDefine the object model. What are the core elements of an object model in OOP?
How to answer
- Definition of the Object Model
- Major elements: Abstraction, Encapsulation, Modularity, Hierarchy
- Minor elements: Typing, Concurrency, Persistence
- Brief explanation of each core element
-
7 MarksbWhat are the main features of the object-oriented paradigm and how do they contribute to its advantages and disadvantages?
How to answer
- Key features: Classes, Objects, Inheritance, Polymorphism, Data Hiding
- Contribution to advantages: Reusability, Maintainability, Security, Extensibility
- Contribution to disadvantages: Overhead, Execution speed, Complexity, Steeper learning curve
-
7 MarksaHow are objects constructed and destroyed in OOP and what are the key concepts involved in this process?
How to answer
- Object instantiation and initialization via constructors
- Types of constructors (default, parameterized, copy)
- Object destruction via destructors and memory deallocation
- Key concepts: Automatic vs Dynamic allocation (`new`/`delete`), RAII
-
7 MarksbExplain the concept of objects with respect to their state, behaviour and identify.
How to answer
- State: Defined by attributes/properties and their current values
- Behaviour: Defined by methods/functions representing actions or state transitions
- Identity: Unique property distinguishing an object from all other objects (memory address/handle)
- Illustrative example showing an object with state, behaviour, and identity
-
7 MarksaExplain different types of loops in OOP. Give examples of for, while and do-while loops.
How to answer
- Introduction to loops/iteration statements in OOP languages
- `for` loop: Syntax, execution flow, code example
- `while` loop: Entry-controlled mechanism, syntax, code example
- `do-while` loop: Exit-controlled mechanism, syntax, code example
-
7 MarksbWhat are static members of a class? How are they different from instance members?
How to answer
- Definition of static data members and static methods
- Key differences: Per-class vs per-instance storage
- Invocation mechanisms (Class name vs object reference)
- Code example demonstrating static vs instance variables
-
7 MarksaExplain the concept of the "is a" relationship in inheritance.
How to answer
- Concept of inheritance modeling real-world hierarchy
- Explanation of 'is-a' relationship (subclass is a specialized version of superclass)
- Difference from 'has-a' (aggregation/composition) relationship
- Code/conceptual example (e.g., Dog is an Animal)
-
7 MarksbCompare interfaces and abstract classes in terms of features, use cases and flexibility.
How to answer
- Definitions of Interface and Abstract Class
- Tabular comparison based on implementation details, constructor presence, speed
- Use cases: Complete contract definition vs partial implementation/base behavior
- Flexibility in multiple inheritance/implementation
-
7 MarksaHow does a friend class in C++ access the private and protected members of another class and what are the implications of this access?
How to answer
- Syntax and declaration of a friend class using keyword `friend`
- Mechanism of accessing private and protected data members
- Implications: Breach/weakening of strict encapsulation, increased coupling
- Non-reciprocal, non-transitive nature of friendship
-
7 MarksbDifferentiate between compile-time (static) and run-time (dynamic) polymorphism with examples.
How to answer
- Definition of compile-time vs run-time polymorphism
- Static: Function overloading, Operator overloading (Early binding)
- Dynamic: Virtual functions, Function overriding (Late/dynamic binding)
- Code examples illustrating both types
- Comparison table
-
14 MarksWhat is a friend function in C++? Why and when is it used? What are the limitations of friend functions in terms of encapsulation and security?
How to answer
- Definition of a friend function and syntax (`friend` keyword)
- Why/When to use: Operator overloading (e.g., `<<`, `>>`), bridging two classes
- Limitations regarding encapsulation: Breaks information hiding
- Security implications: Grants full access to private data without class membership
-
7 MarksaHow do you handle exceptions in a program and what are some best practices for exception handling?
How to answer
- Mechanism of handling exceptions (`try`, `catch`, `finally`/cleanup)
- Flow of control during an exception
- Best practices: Catch specific exceptions, avoid empty catch blocks, clean up resources (RAII), do not use exceptions for standard flow control
-
7 MarksbWhat is the difference between throwing and catching an exception? Provide a code example.
How to answer
- Throwing: Explicit signaling of an anomalous condition via `throw` keyword
- Catching: Intercepting and responding to the thrown exception using `catch` handler
- Code example showing `throw` and corresponding `catch` block
-
14 MarksWrite a short notes (any three) i) Multi-threading ii) Virtual Friend function iii) Abstract classes iv) Data collection v) Type conversion
How to answer
- Multi-threading: Concurrent execution of threads within a process, thread lifecycle
- Virtual Friend function: Concept, why friend functions cannot be virtual directly, and workarounds
- Abstract classes: Classes with pure virtual methods that cannot be instantiated
- Data collection: Collections framework/containers for grouping objects
- Type conversion: Implicit (coercion) vs explicit (casting), conversion operators/constructors
Go to where you left off?
Quick Add to Notes
Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.
Create free accountHave an account? Log in
Notes Panel