Seeking design pattern assingment details...
4 posters
IITDU Forum :: Academics (BIT) :: Semester 5 :: SE 506
Page 1 of 1
Seeking design pattern assingment details...
Course Name: Design pattern
Course Code: SE 506
Assg Date: 29 jan 2011
I heard the next Saturday we have to submit an assignment to our design pattern teacher. I want to know details about the task. Can anyone help...???
Course Code: SE 506
Assg Date: 29 jan 2011
I heard the next Saturday we have to submit an assignment to our design pattern teacher. I want to know details about the task. Can anyone help...???
BIT0111-muctadir- Expert
- Course(s) :
- BIT
Blood Group : B+
Posts : 233
Points : 395
Re: Seeking design pattern assingment details...
You have to just implement three behavioral Patterns in you favorite programming language.
they are -
1. Observer
2. Strategy
3. Mediator
thats all.
Note: language should be object oriented. You cant do it in C and Language Like Java ME is not recommended.
they are -
1. Observer
2. Strategy
3. Mediator
thats all.
Note: language should be object oriented. You cant do it in C and Language Like Java ME is not recommended.
Re: Seeking design pattern assingment details...
The first one i.e observer pattern's problem was-
The second one was Mediator pattern. The problem was to make a chat server (simple). The problem was like-
Strategy pattern showed by Maeenul sir in the last class. He gave a problem like
In a fighting game there exits many modes to fight. A soldier can fight in aggressive mode, defensive mode, friendly mode etc. Write a program where a soldier can change a mode (We can simply change the mode writing like "Now the soldier is in aggressive mode" ) check the following post by Amit
The first problem was given to students as softcopy. But the next two problems were discussed in class.
- Code:
1. Suppose there are some companies like IBM, Microsoft, Apple etc. These companies have their share price. There are some investors like Suzan, Sharif, Iqbal. They are interested about the share prices of the companies. The investors can register to the companies if they are interested to the share price of a specific company. The investors can unregister if they don’t feel interested any more to a specific company.
When the share price of a company changes, the registered investors are automatically informed about the changed price.
Write a code that shows the above features.
The second one was Mediator pattern. The problem was to make a chat server (simple). The problem was like-
- Code:
Make a chat server where a chat room will exits. A user can register but he/she don't have to be logged in(registration is equal to log in system here). User can see who is in the chat room(that means who is in the registered users list.) Message passing will occur between two users through the chat room
Strategy pattern showed by Maeenul sir in the last class. He gave a problem like
The first problem was given to students as softcopy. But the next two problems were discussed in class.
Last edited by BIT0129-Tabassum on Fri Jan 28, 2011 11:07 pm; edited 2 times in total (Reason for editing : to make it correct)
Re: Seeking design pattern assingment details...
I won't be so sure about the 2nd and 3rd problem description.
In the second problem, user is not required to see who is in chat room. the chat message is required to be sent from one user to another through chat room, which is the mediator.
The 3rd problem is not a fighting game. It is a strategy game. The soldier can have different modes. The commander(in this case, our main class) can change it from one mode to another. If it simply displays, "now the soldier is in ... mode" as Tabassum stated, it won't serve the purpose. Rather, when the fight method will be invoked by a soldier, it will fight in its present mode, showing something like, "Fighting in ... mode"
The difference?
The fight method needs to be used in strategy pattern.
In the second problem, user is not required to see who is in chat room. the chat message is required to be sent from one user to another through chat room, which is the mediator.
The 3rd problem is not a fighting game. It is a strategy game. The soldier can have different modes. The commander(in this case, our main class) can change it from one mode to another. If it simply displays, "now the soldier is in ... mode" as Tabassum stated, it won't serve the purpose. Rather, when the fight method will be invoked by a soldier, it will fight in its present mode, showing something like, "Fighting in ... mode"
The difference?
The fight method needs to be used in strategy pattern.
Re: Seeking design pattern assingment details...
BIT0122-Amit wrote:I won't be so sure about the 2nd and 3rd problem description.
In the second problem, user is not required to see who is in chat room. the chat message is required to be sent from one user to another through chat room, which is the mediator.
Sir told that a user can check the online list or who has been registered
For the third one yours is accurate
Re: Seeking design pattern assingment details...
For explaining. Yes.
For implementation, nope.
The checking would occur when an user tries to send a message to another user.
checking who is in online list/who has registered, can mean several possible scenarios. But, they won't need mediator pattern implementation.
Edit:
Muhahahahaa!!! :p nice one.
BTW, design pattern is used in only OOL as far as I know.
For implementation, nope.
The checking would occur when an user tries to send a message to another user.
checking who is in online list/who has registered, can mean several possible scenarios. But, they won't need mediator pattern implementation.
Edit:
Note: language should be object oriented. You cant do it in C and Language Like Java ME is not recommended.
Muhahahahaa!!! :p nice one.
BTW, design pattern is used in only OOL as far as I know.
Similar topics
» Where are the details of the design pattern exam on March 12, 2011?
» Design Pattern study material: Composite Pattern
» Design pattern Assignment - fly weight pattern
» Mediator Design pattern
» Presentation slides of Introduction to Design Pattern
» Design Pattern study material: Composite Pattern
» Design pattern Assignment - fly weight pattern
» Mediator Design pattern
» Presentation slides of Introduction to Design Pattern
IITDU Forum :: Academics (BIT) :: Semester 5 :: SE 506
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Tue Sep 29, 2015 2:45 pm by Sophiawood
» Cisco EHWIC SFP/GE WAN Card
Mon Sep 07, 2015 11:08 am by Sophiawood
» Huawei S1700-28GFR-4P-AC Price
Thu Jun 25, 2015 2:31 pm by Sophiawood
» teach yourself C++ / Herbert Schildt Solutions
Wed Jun 03, 2015 1:52 pm by Abdullah Al Noman
» teach yourself c by herbert schildt pdf
Wed May 13, 2015 11:01 pm by Raquib Ridwan
» ASA 5506X With Firepower ASA5506-K9
Fri Apr 10, 2015 4:31 pm by Sophiawood
» New Trends in Deal Business
Tue Feb 03, 2015 9:38 pm by nersoa
» PoE Power Allocation for WS-C2960S-24PS-L
Wed Nov 05, 2014 11:12 am by Sophiawood
» How to cure back pain
Fri Oct 31, 2014 7:15 pm by Bergen Guildford