Discuss the similarities to different patterns used in software engineering. Which pattern fits best?

Adapter pattern – Modelling


A new instrument (AnalogSpeedometer) from a legacy system has to be integrated into


Asteroids (see Figure 1). The existing class AnalogSpeedometer must not be changed.


Therefore an Adapter pattern should be used. Integrate the AnalogSpeedometer into the


existing model.





2) Pattern abstraction





3) Dynamical model


Model the dynamical behaviour of incrementing the speed in a sequence diagram.


Consider the following classes and actors:


AnalogSpeedometer, SpaceShuttleController, “the adapter”, SpaceShuttle, User.


4) Adapter pattern (programming assignment)


Integrate the AnalogSpeedometer by applying the adapter pattern without modifying it


and with minimal modifications to other classes.

IMPORTANT – Submission Requirements for programming assignment:
Warning: Due to the large number of students, it is very important to exactly fulfill the
submission requirements. Otherwise your submission cannot be processed.

• Only code compiling without any errors will be accepted. Do not submit non-
compiling code!

• Use Java 1.5 and the supplied ANT script to compile
• To submit your solution, execute the ANT target “zip”. When prompted to do so
enter your exercise group and the last name of all of your team members.
• Please double check the generated “zip” file in the asteroids directory:
o It should be named following the schema --
--Exercise05.zip:
o Unzip once and check the contents: src-folder und jar-Archiv
• In your email...
o ...choose the name of the zip archive as subject
o ...note the complete name and “Matrikelnummer” of all team members
• Send the email to your tutor only

Computer Science & Information Technology

You might also like to view...

Calculating the correlation coefficient using the ________ function is useful to determine the type and strength of a relationship between two variables

A) CAUSATION B) COVARIANCE.S C) CORREL D) COVARIANCE.P

Computer Science & Information Technology

What information is not included in an Ethernet frame?

a. Frame size b. Source MAC address c. Pad d. Frame check sequence

Computer Science & Information Technology