CISC 323 Intro to Software Engineering
CISC 323 Intro to Software Engineering
CISC 323 Intro to Software Engineering
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
• M o ti v a ti o n<br />
¤<br />
¢ £<br />
¤ ¥<br />
¦ §<br />
¨¥<br />
©�<br />
Adapter Design Pattern<br />
[Gamma et al., pp 139-150]<br />
– S o m e t i m e s a c l a s s i m p l e m e n t s f u n c t i o n a l i t y s i m i l a r<br />
t o w h a t a n a p p l i c a t i o n r e q u i r e s , b u t n o t t h e<br />
c o r r e c t i n t e r f a c e f o r t h a t a p p l i c a t i o n<br />
– E . g . W e w i s h t o i m p l e m e n t a B o o k L i s t c l a s s<br />
i m p l e m e n t i n g a l i s t o f t e x t b o o k u s e d i n a c o u r s e<br />
int getNumBooks()<br />
Book getBook (int n)<br />
void addBook (Book newBook)<br />
– T h e s e o p e r a t i o n s a r e v e r y s i m i l a r t o t h e<br />
o p e r a t i o n s i n t h e p r e d e f i n e d V e c t o r c l a s s<br />
¤�<br />
§<br />
©��<br />
�<br />
�<br />
��<br />
��<br />
�<br />
��<br />
��<br />
�<br />
�<br />
� � ����<br />
�£<br />
� § �<br />
¤<br />
¤ ¥<br />
§£ �<br />
�<br />
���<br />
��<br />
©§<br />
�<br />
�<br />
�<br />
¡