Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
COMP5028 Object Oriented Analysis and Design  Semester 1, 2005 
1 of 1 
 
 
Laboratory session Seven  
Storie Dixson 432A,B 
Wednesday May 4, 2005 
School of Information Technologies 
The University of Sydney 
 
 
 
Objective 
• Continue work from week 5 and week 6 
• Apply GoF patterns to solve the problem of Identifying different sections of a Weblog 
Tasks 
A. In week 5's tutorial, we have assigned the responsibility of "finding post" to weblog as 
well as archive. We will consider this responsibility in weblog in this tutorial. We will 
have a findPost method in weblog. First identify what should be returned by this 
method? what argument should be passed to this method? Answer the similar question 
for findArchive method in weblog  
B. In week 6's tutorial, we know that OCP can be applied to handle different layout of 
weblog. Based on this general principle, which design pattern we’ve learned so far can be 
applied here? Which abstract methods should the interface provides? What should be the 
structure of applying this pattern in the assignment? Who should be responsible for the 
creation and initialization of the concrete classes? 
C. Consider a possible implementation of a concrete class in the general structure you 
identified in task B. Check a few popular blogs layout and discover possible similarities 
among them. Possible Java library classes you will use here include:  
java.util.regex.Matcher and java.util.regex.Pattern.  
D. Is there any class should be implemented as singleton? 
E. Submit your choice of the blog you are going to process in assignment 2 to your tutor.