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

  The ways to depict constraint graph

The ways to depict constraint graph? illustrate how splitting a domain can be used to solve this problem.

  Describe stages of the processor

Describe the decode stage and Describe the execution stage of add, andi, mul, divi, and neg.

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  How to generate paper for pair of public or private rsa key

How to generate paper for a pair of public or private RSA keys? The high-class reporter for foreign affairs learned about asymmetric cryptography, and proposed to security team at the paper to generate for a pair of public or private RSA keys.

  Declare two variables of type course

Declare two variables of type course.

  Produce a decision table

Produce a decision table

  How a box of caramel delites girl scout cookies

How to a box of Caramel deLites Girl Scout cookies Every spring you looking forward to buying a box of Caramel deLites Girl Scout cookies

  Problem on boolean calculator

Problem on Boolean Calculator

  Write the code used in a for loop

Write the code used in a for loop

  Designing a solution to the problem

Designing a solution to the problem and implementing the design using principles of correct syntax

  Program for dissimilar values for real numbers

Program for dissimilar values for real numbers

  What are java predefined methods

What are java predefined methods

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