Observer (behavioral design pattern) helps you define a subscription mechanism to notify multiple objects about any events that happen to the object they’re observing.
In a class management program, teacher needs to send messages to all students. We can use Observer pattern to implement it.
1. Create Observer interface
2. Create Student class implements the Observer interface
3. Create Observable interface
4. Create Teacher class implements the Observable interface
5. Create a demo program.
In questa pagina del sito puoi guardare il video online Apply Observer pattern to build a Class Management program using Java della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Improve Your Programming skills 08 settembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 53 volte e gli è piaciuto 3 spettatori. Buona visione!