Home > Information technology essays > Q.No.1: Give one example of each design pattern from software domain.

Essay: Q.No.1: Give one example of each design pattern from software domain.

Essay details and download:

  • Subject area(s): Information technology essays
  • Reading time: 2 minutes
  • Price: Free download
  • Published: 1 December 2015*
  • File format: Text
  • Words: 373 (approx)
  • Number of pages: 2 (approx)

Text preview of this essay:

This page of the essay has 373 words. Download the full version above.

1. Proxy
2. Adapter
3. Singleton
(a). Discuss how the relevant design pattern is solving the problem in your example [2 Marks]
(b). Draw Class Diagram for each Example [4 Marks]
(c). Identify the Participants in your example according to Design Pattern [4 Marks]

SINGLETON:
Example of singleton design pattern from software domain is the opening of selected multiple files in the media player.
(a). How is it solving problem:
Singleton provides a global access point in all the components of the application and not creating an object each time an operation is to be performed. In this case, if we have more than one file in a folder and we select all of them and open them, more than one instance are created which results in allocation of resources to each file, thus we eliminate this by using singleton design pattern and only one instance is created so one file will be played and the other will be after’s and only one pop-up window will be opened rather than more than one.
(b). CLASS DIAGRAM:
Media Player
Selectfiles()
Playfile()
UniqueFile
MediaData
(c). PARTICIPANTS:
It only has one participant that is the media player.

PROXY:
Example of Proxy design pattern from software domain is a site which works as a proxy between a shopkeeper that is the user and the supplier.
(a). How is it solving problem:
The shopkeeper has to go himself or the supplier has to come to the shop to collect the order but here proxy pattern applies and the online site of goods works as a proxy between shopkeeper and the supplier.
(b). CLASS DIAGRAM:
(d). PARTICIPANTS:
There are three participants with website being the primary and Shopkeeper and Supplier being the secondary.
ADAPTER:
Example adapter design pattern is the Media Player.
(a). How is it solving problem:
An audio media player is only capable of playing mp3 files that is audio files but introducing another interface of video player that extend media player class will make the player play both audio and media player files and hence two incompatible interfaces will be made compatible using adapter that is media adapter.
(b). CLASS DIAGRAM:
(c). PARTICIPANTS:
The participants included in this example are Media Adapter, Media Player, Audio Media Player and Video Media Player.

...(download the rest of the essay above)

About this essay:

If you use part of this page in your own work, you need to provide a citation, as follows:

Essay Sauce, Q.No.1: Give one example of each design pattern from software domain.. Available from:<https://www.essaysauce.com/information-technology-essays/essay-q-no-1-give-one-example-of-each-design-pattern-from-software-domain/> [Accessed 26-03-24].

These Information technology essays have been submitted to us by students in order to help you with your studies.

* This essay may have been previously published on Essay.uk.com at an earlier date.