4. Object Model Flashcards
(36 cards)
What is Object-Oriented Programming (OOP)?
OOP is a programming paradigm based on “objects” which contain both data (attributes/properties) and code (methods/functions). Objects are instances of classes.
What is Object-Oriented Design (OOD)?
OOD is the process of using objects and object-oriented programming principles when designing a software solution.
What is an “object” in OOP?
An object is an instance of a class. It contains data (attributes) and code (methods) that operate on that data.
What is a “class” in OOP?
A class is a blueprint or template that defines the type and structure of objects. Objects are created as instances of classes.
How do objects interact in OOD?
Objects interact by one object (the “client”) calling a method of another object (the “server”). The method call is the message.
What is a “method signature”?
A method signature defines a method, including its name, the parameters it accepts (inputs), and their data types.
What is an object’s “interface”?
An object’s interface is the set of all its method signatures. It defines the “services” the object offers.
What is “Information Hiding”?
Information Hiding is the principle where an object hides its internal state (attributes) and restricts access to them only through its public interface (methods).
What is “Modularity” in software design?
Modular programming is a design technique that emphasizes separating a program’s functionality into independent, interchangeable modules (packages).
What is the main difference between modules and objects regarding data access?
Modules can have “promiscuous” access to data, often leading to misuse. Objects encapsulate data, providing controlled access through methods.
What is UML?
UML (Unified Modeling Language) is a standardized visual language used in software engineering to represent different aspects of a system’s structure and behavior.
Name three types of UML diagrams.
- Class Diagrams
- Use Case Diagrams
- Sequence Diagrams
- Activity Diagrams
- State Machine Diagrams
- Component Diagrams
- Deployment Diagrams
- Package Diagrams
What is the purpose of a Class Diagram in UML?
To represent the structure of a system by showing classes, their attributes, methods, and the relationships between those classes.
What is the purpose of a Use Case Diagram in UML?
To illustrate interactions between actors (users or external systems) and the system to achieve specific goals.
What is the purpose of a Sequence Diagram in UML?
To depict interactions between objects in a scenario or use case over time, showing the order of messages.
What is the purpose of an Activity Diagram in UML?
To model the flow of activities or actions within a system or use case.
What is the purpose of a State Machine Diagram (or State Diagram) in UML?
To describe the different states of an object or system and the transitions between those states that are triggered by events.
What is the purpose of a Component Diagram in UML?
To show the components (modular parts) of a system and their relationships, dependencies, and interfaces.
What is the purpose of a Deployment Diagram in UML?
To visualize the physical deployment of software components across hardware nodes (e.g., servers, devices).
What is the purpose of a Package Diagram in UML?
To organize and structure the elements (like classes or use cases) of a system into logical groupings called packages.
What are the three compartments in a UML class notation?
- Class Name
- Attributes
- Operations (Methods)
What is “Association” in UML object relationships?
Association means one object accesses another in some way (e.g., calling a method, accessing an attribute).
What is “Inheritance” (or Generalization) in UML?
Inheritance is when an object (derived class) inherits the properties of another object (base class). It represents an “is a” relationship.
What is “Composition” in UML?
Composition is when an object references another object as an instance variable, implying the child class cannot exist without the parent. It represents a “has a” relationship.