0% found this document useful (0 votes)
17 views2 pages

Object-Oriented Programming Quiz

The document is a quiz with 10 multiple choice questions about object oriented software engineering topics. The questions cover concepts like object oriented design, classes and objects, encapsulation, abstraction, inheritance, polymorphism, aggregation, requirements, and functional requirements.
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)
17 views2 pages

Object-Oriented Programming Quiz

The document is a quiz with 10 multiple choice questions about object oriented software engineering topics. The questions cover concepts like object oriented design, classes and objects, encapsulation, abstraction, inheritance, polymorphism, aggregation, requirements, and functional requirements.
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

The University of Lahore, SE Department

Object Oriented Software Engineering


Quiz # 1
Time Allowed: 15 Minutes Section: S Marks: 10
Date: 06-03-2021 Program: BS(SE)

1. The method of design encompassing the process of object-oriented decomposition and a


notation for depicting both logical and physical and as well as static and dynamic models of the
system under design is known as:
a) Object- Oriented Programming
b) Object- Oriented Design
c) Object- Oriented Analysis
d) None of the mentioned

2. What is the programming style of the object-oriented conceptual model?

a) Invariant relationships
b) Algorithms
c) Classes and objects
d) Goals, often expressed in a predicate calculus.

3. The essential characteristics of an object that distinguish it from all other kinds of objects and
thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer is
called:
a) Encapsulation
b) Modularity
c) Hierarchy
d) Abstraction

4. The process of compartmentalizing the elements of an abstraction that constitute its structure
and behavior is called as

a) Hierarchy
b) Encapsulation
c) Modularity
d) Entity Abstraction

5. Single inheritance, Multiple inheritance, and Aggregation comes under _______

a) Modularity
b) Typing
c) Hierarchy
d) None of the mentioned
6. What is that concept in type theory in which a single name may denote objects of many
different classes that are related by some common super class referred to ______

a) Monomorphism
b) Type Checking
c) Polymorphism
d) Generalization

7. In order to model the relationship “a hostel has rooms”, between Hotel and Room, you could
use:
a) Aggregation
b) Association
c) Composition
d) Realization

8. An important aspect of coding is?


a) Readability
b) Productivity
c) To use as small memory space as memory
d) Brevity

9. Which one of the following is a requirement that fits in a developer’s module?

a) Availability
b) Testability
c) Usability
d) Flexibility

10. Which one of the following is a functional requirement?

a) Maintainability
b) Portability
c) Robustness
d) None of the mentioned

Common questions

Powered by AI

Classes and objects in an object-oriented conceptual model guide software development by defining the structure of data and the behavior of elements within a system. Classes serve as blueprints that encapsulate data fields and methods, allowing developers to implement invariant relationships and algorithms that define how objects interact and function. This structuring facilitates modular design, enabling scalability and reuse of code, and ensures that complex systems can be represented through simple, interacting units .

Inheritance in object-oriented programming allows one class to derive characteristics from another, contributing to hierarchy by creating a structured, layered organization of classes. Single inheritance enables a class to inherit from one parent class, facilitating clear and straightforward hierarchies. Multiple inheritance, where a class can inherit from multiple parents, increases flexibility but can introduce complexity. Aggregation, a form of inheritance, models relationships where a class can contain objects of other classes, enhancing modular design. These forms of inheritance ensure reusability by allowing shared functionality and attributes to be used across different parts of a system, thus streamlining development and maintenance .

Testability as a requirement in a developer's module influences software quality and reliability by ensuring that the software can be effectively evaluated through tests to ensure it meets specified requirements and functions correctly. High testability allows developers to detect defects early in the development process, reducing the risk of failures and increasing the reliability of the software. Testable code often follows good practices such as modularity and clarity, making it easier to isolate and test individual components, which contributes to overall software robustness and ease of maintenance .

Abstraction in object-oriented design is the process of simplifying complex systems by focusing on essential characteristics while concealing irrelevant details. It allows developers to create models that highlight the system's core functionality and relationships. Abstraction is critical for modeling complex systems as it reduces cognitive load, enhances comprehensibility, and facilitates design by enabling developers to work at higher conceptual levels. This abstraction makes it easier to manage complexity, communicate system design, and adapt to changes over time .

Functional requirements specify what the software should do, describing the system's behaviors in response to inputs from the user or other systems. They define the core functions and capabilities necessary to fulfill user needs or business objectives. In contrast, non-functional requirements such as maintainability, portability, and robustness characterize how the system performs these functions, focusing on attributes like performance, usability, and reliability. Functional requirements provide a blueprint for system behavior, while non-functional requirements set the standards for its quality and performance .

Aggregation is a relationship where a class is composed of one or more classes, indicating a whole-part relationship where parts can exist independently of the whole. For example, in the relationship 'a hostel has rooms', rooms can exist independently of the hostel, making this an aggregation relationship. In contrast, composition implies a whole-part relationship where the part cannot exist independently of the whole; for example, a 'house has walls', and without the house, walls do not have meaning. Association is a more general relationship where objects are associated without implying a whole-part relationship or dependency .

Encapsulation is a principle in object-oriented programming that involves hiding the internal state and requiring all interactions to occur through an object's methods. This approach maintains crisp conceptual boundaries by preventing external entities from directly accessing and modifying the internal representation of an object. It ensures that an object's integrity is preserved and allows the implementation details to be changed without affecting other parts of the software, thus contributing to modularity and robustness .

Polymorphism enhances flexibility and extensibility in object-oriented systems by allowing the same operation to behave differently on different classes. It enables methods to use objects of different types as long as they share a common interface or superclass. This feature allows developers to introduce new classes with minimal changes to existing code by ensuring that the same method calls can operate on new objects without modification. Polymorphism supports the open/closed principle, where systems can evolve by adding new functions, improving adaptability and reducing the risk of errors during code modification .

Readability is considered an important aspect of coding because it directly impacts the maintainability and understanding of the code by both current and future developers. Readable code is easier to debug, extend, and modify, leading to increased productivity and reduced likelihood of errors. Moreover, it facilitates collaborative development, where multiple developers can understand and work on the same codebase efficiently. Given the complexity and longevity of many software projects, prioritizing readability helps ensure that code remains accessible and useful over time .

Object-oriented decomposition is significant in software design because it allows for breaking down a system into manageable parts known as objects, which model both real-world and software components. This decomposition facilitates the creation of both logical and physical models, which represent the system's structure and behavior at different abstraction levels. Logical models focus on the classes and objects, highlighting their interactions and relationships, while physical models illustrate how these entities map to actual software components. This dual representation ensures the system is comprehensively understood and efficiently developed .

You might also like