Oo concepts

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Listen to an AI-generated conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What is cohesion?

How closely the operations in a routine are related.

What is coupling?

The strength of a connection between 2 routines.

What is couping a complement to?

Cohesion

What does cohesion describe?

<p>How strongly the internal contents of a routine are related to each other.</p>
Signup and view all the answers

What does coupling describe?

<p>How strongly a routine is related to other routines?</p>
Signup and view all the answers

How should you aspire to apply coupling & cohesion to your designs?

<p>The goal is to create routines with internal integrity (strong cohesion) and small, direct, visible, and flexible relations to other routines (lose coupling).</p>
Signup and view all the answers

Martin Fowler describes 3 different perspectives in the software development process? What are they?

<p>Conceptual, specification, and implementation.</p>
Signup and view all the answers

Define the conceptual development perspective?

<p>This perspective &quot;represents the concepts in the domain under study... a conceptual model should be drawn with little or no regard for the software that might implement it...&quot;</p>
Signup and view all the answers

Describe the specification development perspective.

<p>It looks at the software, but only its interfaces, not its implementation.</p>
Signup and view all the answers

Describe the implementation development perspective.

<p>The code itself. This is probably the most often-used perspective, but in many ways, the specification perspective is often a better one to take.</p>
Signup and view all the answers

What question does the conceptual perspective answer?

<p>What am I responsible for?</p>
Signup and view all the answers

What question does the specification perspective answer?

<p>How am I used?</p>
Signup and view all the answers

What question does the implementation perspective answer?

<p>How do I fulfill my responsibilities?</p>
Signup and view all the answers

Define an object at the conceptual level.

<p>An object is a set of responsibilities.</p>
Signup and view all the answers

Define an object at the specification level.

<p>An object is a set of methods (behaviors) that can be invoked by other objects or by itself.</p>
Signup and view all the answers

Define an object at the implementation level.

<p>An object is code and data and computational interactions between them.</p>
Signup and view all the answers

Define abstract class.

<p>Abstract classes define what a set of related classes can do.</p>
Signup and view all the answers

Define classes.

<p>Classes define the type of object I have based on the responsibilities this object has. Responsibilities can be divided into behavior and/or state. These can be implemented using methods and/or data, respectively.</p>
Signup and view all the answers

Define a concrete class

<p>A class that implements a particular type of behavior for an abstract class. Concrete classes are specific, nonchanging implementations of a concept.</p>
Signup and view all the answers

Define encapsulation.

<p>Typically defined as data hiding, but better thought of as any kind of hiding (type, implementation, design, and so on).</p>
Signup and view all the answers

Define inheritance.

<p>A class inherits from another class when it receives some or all of the qualities of that class. The starting class is called the base, super, parent, or generalized class, whereas the inheriting class is called the derived, sub, child, or specialized class.</p>
Signup and view all the answers

Flashcards

Cohesion

How closely the operations in a routine are related.

Coupling

The strength of a connection between 2 routines.

Coupling complements what?

Cohesion

Cohesion Describes...

How strongly the internal contents of a routine are related to each other.

Signup and view all the flashcards

Coupling Describes...

How strongly a routine is related to other routines.

Signup and view all the flashcards

Design Goal: Coupling & Cohesion

Create routines with internal integrity (strong cohesion) and small, direct, visible, and flexible relations to other routines (loose coupling).

Signup and view all the flashcards

Facade Pattern

Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.

Signup and view all the flashcards

Adapter Pattern.

Converts the interface of a class into another interface that the clients expect. Adapter let's classes work together that could not otherwise because of incompatible interfaces.

Signup and view all the flashcards

Strategy Pattern

Defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy let's the algorithm vary independently from clients that use it.

Signup and view all the flashcards

GOF's 3 principals to anticipate change.

Program to an interface. Favor object aggregation over class inheritance. Encapsulate the concept that varies.

Signup and view all the flashcards

More Like This

Cohesión y Componentes en Software
21 questions
Software Design: Coupling and Cohesion
20 questions
Use Quizgecko on...
Browser
Browser