Create a program with this problem using the “Observer pattern”, STRICTLY
When a Message is sent to a Mailing List, the Mailing List sends a
copy of the Message to every Inbox that has subscribed to the List.
When an Inbox receives a message, it displays this notification:
New Message received. You have 1 unread message(s).
A Message Board can subscribe to a List. When it receives a new
Message, it displays the following about the 5 latest Messages: From,
Subject. It displays the Messages in reverse order, latest Message
first.
An Inbox can:
1. Display all Messages - displays following about the Messages: Message No.*, From, Subject
2. Display all unread Messages - same display as 1
3. Display a Message given a Message No. - displays From, Subject, and Body; marks the Message as read
4. Mark all Messages as read
*The same Message can have a different Message Nos. in different Inboxes.
Create a main class called MailingListTester, and simulate the following:
Inbox1 subscribes to the Mailing List.
Inbox2 subscribes to the Mailing List.
Message Board subscribes to the Mailing List.
A Message is sent to the Mailing List.
Inbox1 displays all Messages.
Inbox1 displays the latest Message sent.
Inbox2 displays all unread Messages.
A Message is sent to the Mailing List.
Inbox1 marks all Messages as read.
Inbox2 displays all unread Messages.
Inbox2 displays the latest Message sent.

Note: cReate your own observers..

i have two programming exerise and this one is very difficult..huhu:-/
pleaseee...

A Quote from the announcement section:-

Also, to keep DaniWeb a student-friendly place to learn, don't expect quick solutions to your homework. We'll help you get started and exchange algorithm ideas, but only if you show that you're willing to put in effort as well.

So ... where is your effort ?

thanks anyway..i had done it last night,,i have to do it because today is the deadline.thanks for the time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.