100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

Advanced Object Oriented Programming TEST QUESTIONS & ANSWERS ALREADY GRADED A+ 2025 Terms in this set (174) Intent of Command Pattern To encapsulate a function call as an object. Consequence of Command Pattern Decouples objects that invoke a given opera

Beoordeling
-
Verkocht
-
Pagina's
28
Cijfer
A+
Geüpload op
23-02-2025
Geschreven in
2024/2025

Advanced Object Oriented Programming TEST QUESTIONS & ANSWERS ALREADY GRADED A+ 2025 Terms in this set (174) Intent of Command Pattern To encapsulate a function call as an object. Consequence of Command Pattern Decouples objects that invoke a given operation with ones that know how to perform it. Intent of the Interpreter Pattern Define a representation for a languages grammar along with an interpreter that uses the representation to interpret sentences of that language. Consequence of Interpreter Pattern It's easy to change and extend the grammar (generally just add a new class). Intent of the Iterator pattern It provides a way to access elements of an aggregate collection without exposing the underlying representation. Consequence of the Iterator pattern They support variations in the interpretation of a collection or aggregate. With complex collections the desired type of traversal may change and using this pattern makes it easier to change the traversal algorithm. What is a robust iterator? An iterator that ensures that insertions and removals won't interfere with traversal, and does so without copying the collection. What is the intent of the Memento Pattern? Without violating encapsulation (private variables), it allows one to capture and externalize an object's internal state so that the object can later be restored to that state.

Meer zien Lees minder
Instelling
Advanced Object Oriented Programming
Vak
Advanced Object Oriented Programming










Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Advanced Object Oriented Programming
Vak
Advanced Object Oriented Programming

Documentinformatie

Geüpload op
23 februari 2025
Aantal pagina's
28
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

Advanced Object Oriented
Programming TEST QUESTIONS &
ANSWERS ALREADY GRADED A+ 2025


Terms in this set (174)

Intent of Command To encapsulate a function call as an object.
Pattern

Consequence of Decouples objects that invoke a given operation with ones that
Command Pattern know how to perform it.

Intent of the Interpreter Define a representation for a languages grammar along with
Pattern an interpreter that uses the representation to interpret
sentences of that language.


Consequence of It's easy to change and extend the grammar (generally just add
Interpreter Pattern a new class).

Intent of the Iterator It provides a way to access elements of an aggregate
pattern collection without exposing the underlying representation.



Consequence of the They support variations in the interpretation of a collection or
Iterator pattern aggregate. With complex collections the desired type of
traversal may change and using this pattern makes it easier to
change the traversal algorithm.




What is a robust iterator? An iterator that ensures that insertions and removals won't
interfere with traversal, and does so without copying the
collection.



Without violating encapsulation (private variables), it
What is the intent of the
allows one to capture and externalize an object's internal
Memento Pattern?
state so that the object can later be restored to that state.

,Consequence of the It provides encapsulation boundaries. And prevents the
Memento Pattern exposure of contents while enabling an object to store its
state.


What is the intent of the To allow an object to alter its behavior when its
State Pattern? internal state changes. The object will appear to
change its class.


Consequence of the State It localizes the state-specific behavior and partitions behavior for
Pattern different states.

What is the intent of the It defines a family of algorithms, encapsulating each one
Strategy Pattern? and then makes them interchangeable. The algorithms
are also decoupled from clients.


Consequence of the They create families of related algorithms and can leverage
Strategy Pattern inheritance to simplify implementation of commonly-used
functionality.


What is the intent of the To define a new operation without changing the classes of
Visitor Pattern? the elements on which it operated to. It represents an
operation to be performed on elements of an object
structure as a class.


Consequence of the The adding of new operations becomes easy as it removes the
Visitor Pattern task of modifying existing classes.

What is the intent of the To compose objects into tree structures and represent part-
Composite Pattern? whole hierarchies. It lets clients treat individual objects and
compositions of objects uniformly.



Consequence of the They define a class hierarchy of primitive and composite
Composite Pattern objects.

Shearing Layer The state in which between layers where they change from
one speed to another. One layer may be changing slower
than another.

, Program to Interface
Two main design principles
Favor Composition over Inheritance


Program to Interface We don't know what something does. In fact it is better
that we don't know as each time an operation happens
there is a different implementation of the interface.
Example: Accept => Turtle, Accept => Visitor


Favor Composition over Composition gives us flexibility like the strategy pattern.
Inheritance Instead of creating subclasses to store priority at compile
time, use a priority class to change it during runtime.



Coupling One class knowing about the other.


Ex. Turn Expression knowing about the Memento.
(coupled). Also Expressions and Visitors.

Cohesion This is good. We want lots of it. When looking at a class or
function, what is the task that we are trying to accomplish?
Putting "PrintStudents" in a priority queue will make it less
cohesive.


The interpreter pattern is False. It is not going to be as efficient as assembly code.
efficient.

Difference between State Structure is the same. State expects that the object should
and Strategy pattern change its state frequently while the Strategy typically does
not.


Is adding a new Visitor Yes but if you add a new type of visit or the grammar
easy? changes, you must go to each visitor class and change the
grammar/new type to visit.


What design pattern Iterator. We don't know the structure because the iterator
reduces coupling handles that.
between classes?
$15.49
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper
Seller avatar
Quizlettt

Ook beschikbaar in voordeelbundel

Thumbnail
Voordeelbundel
Package deal:::Advanced Programming
-
5 2025
$ 85.45 Meer info

Maak kennis met de verkoper

Seller avatar
Quizlettt Nursing
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
0
Lid sinds
11 maanden
Aantal volgers
0
Documenten
292
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen