1.System Concepts for Object Modelling Flashcards

1
Q

What is Encapsulation in OOP?

A

The concept of Packaging several items together into single unit known as a class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The primary purpose of Encapsulation.

A

To hide the internal details of an object and to restrict access to its internal state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is Encapsulation important in OOP?

A
  1. It reduces potential issues in software.
  2. It minimizes the changes to other objects if one malfunctions.
  3. Hiding operations decreases the need for modifications elsewhere.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does Encapsulation ensure in object-oriented programming?

A

It ensures that attributes can only be accessed via well defined methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Inheritence in OOP?

A

The concept wherein methods and/or attributes defined in one class (Parent Class) can be inherited or reused by another class. (child/sub class).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Generalization?
(Gen)

A

A technique wherein the attributes and behaviors that are common to several types of classes are grouped / abstracted into their own class called a supertype.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Specialization?(spec)

(spec)

A

In addition to the attributes and methods that are shared by the super-class, a sub-class can have its own attributes an methods we call it Specialization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain Polymorphism

A

The concept that different objects can respond to the same message in different ways.
(Allows the same service to have multiple forms.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the two main categories of polymorphism?

A
  1. Overloading
  2. Overriding
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the two types of Overloading?

A
  1. Method Overloading
  2. Operator/Function Overloading
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

(Number) Multiplication —> (String) Concatenation

What is Operator Overloading?

A

Same operator behaves differently based on the types of operand; we call it operator overloading.

Changing the way an operator behave.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Overriding?

A

It is the process where a subclass or a child class has its own implementation for a method that is defined by its parent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Dynamic / Late Binding?

A

It is the concept where the type of the object created is determined at runtime.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Static Binding?

A

The binding which can be resolved at compile time by the compiler is known as static or early binding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Abstraction?

A

A mechanism to reduce and filter out details so that one can focus on a few concepts at a time. Focus on Essentials,
Ignore the irrelevant.
Ignore the unimportant.

Filter out an object’s properties and operations until just
the ones you need are left

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an Association?

A

A natural business relationship between two or more classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is Aggregation?

A

In a relationship between which a large class is composed using classes, the large class is considered as the whole class, and the small classes are part classes, but if the whole is to die, the parts are to be destroyed with it.

18
Q

What is Composition?

A

This is a stronger form of aggregation where the **whole is composed with parts **but here if the whole is to die, the parts are to be destroyed with it.

19
Q

What is Multiplicity?

A

This tells **how many instances **of one class are connected with a single instance of another class.

20
Q

The four key types?

Name some common cardinalities in OOP.

A
  • 1
  • 0..1
  • 1..*
  • 0..* or *
    specific range -> 7..9

specific range -> 7..9

21
Q

The development of Unified Modeling Language
(UML)
was led by?

A
  • Grady Booch,
  • Ivar Jacobson,
  • James Rumbaugh
22
Q

Is Unified Modeling Language (UML) primarily a standard for object modeling, or a method for developing systems?

A

It is a standard for object modeling.

23
Q

The two main categories of UML diagrams?

A
  1. Structural/Static Diagrams
  2. Behavioral/Dynamic Diagrams.
24
Q

Name the seven Structural Diagrams

A
  1. Class Diagram
  2. Component Diagram
  3. Object Diagram
  4. Profile Diagram
  5. Composite Diagram
  6. Deployment Diagram
  7. package Diagram
25
Q

Name the seven Behavioral diagrams.

A
  1. Activity diagram.
  2. Usecase diagram.
  3. State Transition/ Machine Diagram.
    Interaction diagrams.
  4. Timing Diagram
  5. Sequence Diagram
  6. Communication Diagram
  7. Interaction Overview Diagram
26
Q

What is the purpose of
Use-Case Diagrams in (UML) ?

A
  • To represent a context model for a system.
  • To gather user requrements.
27
Q

What is the purpose of
Class Diagrams in (UML) ?

A
  • To show the set of classes, interfaces, collaborations, and their static relationships within a system.
28
Q

What is the most common diagram found in modeling object-oriented systems?

A
  • The class diagram.
    (It is considered as the backbone of UML)
29
Q

What is the purpose of
Object Diagrams in (UML) ?

A
  • To model actual object instances with current attribute values.
  • To show a set of objects and their relationships.
  • To provide **a snapshot of the system’s objects at one point in time.
30
Q

What is the purpose of State Transition/ Machine Diagrams in (UML) ?

A
  • To show a State Machine consisting of states, transitions, events, and activities.
  • To model how events can change the state of an object over its lifetime.
31
Q

What is the purpose of Sequence Diagrams in (UML) ?

A
  • To emphasize the time odering of messages.
  • To graphically display how objects interact with each other via messages in the execution of a use case or scenario.
32
Q

What is the purpose of Activity Diagrams in (UML) ?

A
  • To show the flow from activity to activity within a system.
  • To address the dynamic view of a system.
33
Q

In Activity Diagrams, Starting & Ending states are represent using?

A
  • Starting state: Solid circle
  • Ending State: Bull’s eye
34
Q

What is the purpose of Communication/Collaboration Diagrams in (UML) ?

A
  • To emphasize the structural organization of the objects that send and receive messages.
  • To show the interaction of objects via messages.
  • Used for the same purpose as using Sequence Diagrams.
35
Q

What is the purpose of Component Diagrams in (UML) ?

A
  • Shows the organizations and dependencies
    among a set of components. (Software Components).
  • Address the static implementation view of a
    system.

(Helps to divide your system into S/W components.)

36
Q

What is the purpose of Deployment Diagrams in (UML) ?

A
  • To show the configurations of runtime processing and the components live on them.
  • To show the physical architecture of a computer-based system.

It’s useful to show which component is deployed where.

37
Q

New in UML 2.0

What is the purpose of Composite Structure Diagrams in (UML) ?

A
  • To decompose the internal structure of a system.
  • A diagram which shows something about the
    class’s internal structure.

Shows the internal structure of a system.

It allow you to illustrate how classes, components, and other structural elements collaborate and interact to achieve a specific functionality within a larger system.

38
Q

New in UML 2.0

What is the purpose of Interaction Overview Diagrams in (UML) ?

A
  • To replace some of the activities in the activity diagram with sequence / communication diagrams
    (or a combination of the two).
  • To show how objects interact within each activity of a use case.
  • To provide an overview of the control flow.
39
Q

What is the purpose of Timing Diagrams in (UML) ?

A
  • To show how long an object is in a particular state.
  • To use when designing embedded
    software
    systems for devices.
40
Q

What is the purpose of Package Diagrams in (UML)?

A
  • To combine a number of classes or
    components into a subsystem.

It allows representing the large-scale structure of large systems.

41
Q

What is the purpose of Profile Diagrams in (UML) ?

A
  • To describe lightweight extension mechanism to the UML.
  • Profiles allow adaptation of the UML meta-model for different:
    1. platforms
    2. domains (such as real-time or business process modeling).