What is an interface

Assignment Help Computer Engineering
Reference no: EM133221

Question

Assume we have three classes: AlarmClock, Beeper, and AlarmWindow. In following you see an interaction showing an AlarmClock sending show message to an AlarmWindow and the beep message to Beepers when it receives alarm message (i.e. when the clock's alarm event occurs, it sends these messages).

Now assume you have been asked to change these classes so they collaborate according to the Observer pattern. Suppose that AlarmClocks are publishers and Beepers and AlarmWindows are observers.

a. What is an interface (name each method and give a short description of each method) that AlarmClocks must implement?

b. What is an interface (name each method and give a short description of each method) that Beepers and AlarmWindows must implement?

c. illustrate a class diagram to show the relevant classes, methods, associations, and navigability for your adaptation to Observer pattern.

d. Rewrite above interaction to show how clock, b1, b2, and window interact according to an Observer pattern.

 

Reference no: EM133221

Questions Cloud

Generate a context diagram of the system : Generate a context diagram of the system
International human resource management : Human resource management is more challenging for a multinational business than a strictly domestic business, international assignments maintain to be an important aspect of international business from the organization's perspective
Illustrate general network design : Illustrate general network design
Program on string representing : Program on  string representing
What is an interface : What is an interface
Write down program for a bank account : Write down program for a bank account
Introduce relationship sets or additional entity sets : Introduce relationship sets or additional entity sets
Problems on word processing application : Problems on word processing application
What is customer relationship management system : What is Customer Relationship management System (CRM)? How does such system add value to an organisation and to its consumers How does a Database Management System assist a business to improve centralisation, eliminate redundancy, and maintain re..

Reviews

Write a Review

Computer Engineering Questions & Answers

  Generate a work breakdown structure code

Generate a Work Breakdown Structure Code

  Generate queries for new database

Generate Queries for New Database

  Evaluates and contrast tcp and ud

Describe the need for the Transport Layer. Recognize the role of the Transport Layer as it provides the end to end transfer of data between applications.

  Write pseudo code - program and draw flow chart

Write pseudo code, program and draw flow chart for programs

  Identify the security provisions

Identify the security provisions

  How to produce an average class with a public data

How to produce an Average class with a public data Produce an Average class with a public data member to collect the sum of integer entries and a public data member to hold the double average of the sum of the 10 integers.

  Program on matrix

Program on matrix

  What is total capacity of a track

What is total capacity of a track

  Why is an object (oop) a module

Why is an object (OOP) a module

  Identify connectivity of each relationship

Identify connectivity of each relationship

  Risk assessment of ict system

Risk Assessment of ICT System and Developing Computer Incident Response System on WAMP platform

  Describe the meaning of storage density

Describe the meaning of storage density

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd