JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Software Design » Design Pattern  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
作者 大家好,可唔可以教我點做呢個?
ccccccc1314





發文: 3
積分: 0
於 2014-11-22 11:50 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list

GoodHealth Fitness Corporation is a large fitness club. It provides state-of-the-art equipment to its members to use. The company maintains a membership system for recording members’ information and prepaid hours for using the club’s facilities. Recently, GoodHealth plans to acquire GreenFitness Limited which is a small fitness club. After the acquisition, GrantFitness Corporation is established to manage the business operation of GoodHealth Fitness Corporation and GreenFitness Limited.

GoodHealth uses a class called “MemberCare” to manage the member records. The system has the following basic methods to support the daily operations.
1. createMember ( ) to create a Member object with zero prepaid hours
2. searchMember ( ) to search a Member object by id
3. remove ( ) to remove a Member object by id
4. changePhoneNumber ( ) to update the phone number of a Member object
5. addPrepaidHours ( ) to add the given hours to a Member object
6. usePrepaidHours ( ) to deduct the given hours from a Member object

GreenFitness uses a class called “ClientControl” to manage the client records. The system has the following basic methods to support the daily operations. 1. createClient ( ) to create a Client object with zero remaining hours

findClient ( ) to search a Client object by cid

deleteClient ( ) to remove a Client object by cid

updateContactNumber() to update the contact phone number of a Client object

addHours ( ) to add the given hours to a Client object

deductHours () to deduct the given hours from a Client object

The followings are the simplified class diagrams of the existing systems for your reference.

As a system analyst of the GrantFitness Corporation, you are required to support the system integration. You are asked to design and develop the GrantFitness System for integrating the classes in the existing two systems. You are reminded that the design of the existing classes: MemberCare, Member, ClientControl, and Client must be kept unchanged.

You should minimize the impact of future change on data structures and operations in both existing systems. However, your new system should integrate the operations with one common user interface. Moreover, GrantFitness may acquire other company in the future and your new system must support future integration.

The new system should provide the following functions:
1. Create a new member record for a new member in a company (GoodHealth, or GreenFitness, or any new company in the coming future)
2. Show member details (such as id/cid, name/cname, phoneNumber/contactNumber, prepaidHours/remainingHours) by a given id (input id=* to show all records)
3. Add/deduct hours to/from a member record
4. Update the phone number of a member record
5. Undo last command
6. Redo the last undone command
7. Show undo/redo list

Your system design should conform to the Open Closed Principle so that your design should easily support new functions, e.g. change the name of a member.

You MUST apply the following design patterns for your new system:  Adapter pattern to support the operations between the two existing companies and the future integration for any new company acquired by GrantFitness Corporation.

**** Memento pattern to support “Undo” and “Redo” functions****

Extra Reference This sample run is served for reference only. You are free to design your own user interface.

how to do the adapter and Memento pattern

:(:(:(:(:(:(


ccccccc1314 edited on 2014-11-22 17:22
reply to postreply to post
作者 Re:大家好,可唔可以教霉我點做呢個? [Re:ccccccc1314]
roysiu





發文: 236
積分: 0
於 2014-11-22 16:45 user profilesend a private message to usersend email to roysiureply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
GoodHealth 是一間大型健身連鎖店,最寶貴的資產是客戶,他們會定期使用健身室的設施,所以有不同種類關於客戶的記錄。

這些記録包括:
1.
2.
3.
4.
5.
6.

他們使用MemberCare類別中央管理這些記錄,大致機制有
1.
2.
3.
4.

系統包括
A.
B.
C.

為了減少系統不適用的impact,change management和configuration management會如下文件計劃:
1.
2.

此外,請不要用教霉,說enrich。

可能的是你受了壓力,想摧眠自己,想思維退化至某種較幼稚的階段,失去了正常清醒時所具有的控制,落入一種較原始的思維方式,因而憑衝動行事並進行幻想與幻覺的製作。

這在進行設計或相關專業時是可以理解的,但事實是這會令你失去對現實情況的正確判斷,和不斷自我抗奮,不能自拔⋯

真的,不是嚇你,很多患精神分裂的病例,就是由此開始了⋯

冷靜丶放鬆幫到你⋯


roysiu edited on 2014-11-22 19:17
reply to postreply to post
作者 Re:大家好,可唔可以教我點做呢個? [Re:roysiu]
ccccccc1314





發文: 3
積分: 0
於 2014-11-22 20:35 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
你介唔介意我加你SKYPE 你慢慢教我... 因為星期三交了,,,,,

我係PROGRAM白痴...


reply to postreply to post
作者 Re:大家好,可唔可以教我點做呢個? [Re:ccccccc1314]
roysiu





發文: 236
積分: 0
於 2014-11-22 21:35 user profilesend a private message to usersend email to roysiureply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
https://www.youtube.com/watch?v=BjKmWk3oE4E

Program is to break down problem.

How old are you or what is your favorite color may be a good problem for you to start.


roysiu edited on 2014-11-22 21:39
reply to postreply to post
作者 Re:大家好,可唔可以教我點做呢個? [Re:roysiu]
ccccccc1314





發文: 3
積分: 0
於 2014-11-22 21:37 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我加左你. SKYPE .

reply to postreply to post
作者 Re:大家好,可唔可以教我點做呢個? [Re:ccccccc1314]
roysiu





發文: 236
積分: 0
於 2014-11-22 22:00 user profilesend a private message to usersend email to roysiureply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Raise up your passion. Make up your energy. Identify problem. Breaking down issues.

Go it ahead. You okay.


reply to postreply to post
作者 Re:大家好,可唔可以教我點做呢個? [Re:ccccccc1314]
roytsang





發文: 620
積分: 1
於 2014-11-24 14:58 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
ccccccc1314 wrote:
你介唔介意我加你SKYPE 你慢慢教我... 因為星期三交了,,,,,

我係PROGRAM白痴...

既然你係PROGRAM白痴想當初點解揀呢科讀呢?


reply to postreply to post
作者 Re:大家好,可唔可以教我點做呢個? [Re:roytsang]
roysiu





發文: 236
積分: 0
於 2014-11-25 05:54 user profilesend a private message to usersend email to roysiureply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
roytsang wrote:
既然你係PROGRAM白痴想當初點解揀呢科讀呢?

他可以是文青呢,例如:
http://big5ploy.qidian.com/BookReader/3145735,55514998.aspx

沒完沒了,搞不清呢Angry

不過,也可以只是一個電玩迷,什麼第一掌門呀,封神榜呀沒完沒了玩了一推子⋯Dead


roysiu edited on 2014-11-25 06:04
reply to postreply to post
» JWorld@TW »  Software Design » Design Pattern

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8