Explain why the operation handleMessagefromServer() appears in both ObservableClient and AdaptableClient classes. Are they concrete or abstract?

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter18: Stacks And Queues
Section: Chapter Questions
Problem 18PE
icon
Related questions
Question
100%

1. Explain why the operation handleMessagefromServer() appears in both ObservableClient and AdaptableClient classes. Are they concrete or abstract?

2. If we want the system give a signal to the client when a message from the server is received, what should the program do? Indicate what methods will be used to implement your idea.

3. Indicate the advantages of using the Observable pattern and Adapter
pattern in this design.

The following is a class diagram of a subsystem of a Chat program using OCSF.
«interface»>
Observer
«interface»>
CharlF
display()
I
ClientConsole
accept()
display()
main()
clientUI
update()
A
I
I
ChatClient
update()
client
quite()
handleMessageFromClientUI()
Observable
notifyObservers()
AbstractClient
AdaptableClient
connection Extablished()
connectionClosed()
handleMessagefromServer()
ObservableClient
openConnection()
closeConnection()
sendToServer()
isConnected()
connection Closed()
connection Established()
handleMessagefromServer()
1
Transcribed Image Text:The following is a class diagram of a subsystem of a Chat program using OCSF. «interface»> Observer «interface»> CharlF display() I ClientConsole accept() display() main() clientUI update() A I I ChatClient update() client quite() handleMessageFromClientUI() Observable notifyObservers() AbstractClient AdaptableClient connection Extablished() connectionClosed() handleMessagefromServer() ObservableClient openConnection() closeConnection() sendToServer() isConnected() connection Closed() connection Established() handleMessagefromServer() 1
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT