wiki:CRCCards
Last modified 9 years ago Last modified on 2008-09-12 22:33:18

CRC-cards

Phase 4 of the course assignment

Member Class (Member)

Class name: Member
Collaborators:
Responsibilities:
(- doesn't know about Club or the user interface)
- knows the fields of a member (name, SSN, telephone etc.)
- can validate the fields (syntax)
- can parse member's info from a string 1|Duck Donald|..|
- can pass the ith field as a string
- can get the ith field from a string

- strings

Hobby Class (Hobby)

Class name: Hobby
Collaborators:
Responsibilities:
(- doesn't know about Club or the user interface)
- knows the fields of a hobby
- can validate the fields (syntax)
- can parse a hobby from a string 4|fishing|1955|20
- can pass the ith field as a string
- can get the ith field from a string

- strings

Club Class (Club)

Class name: Club
Collaborators:
Responsibilities:
- handles the cooperation of the Members and Hobbies - classes and passes their data on request
- loads and saves the club registry with the help of its collaborators

- Members
- Hobbies

Members Class (Members)

Class name: Members
Collaborators:
Responsibilities:
- maintains the actual member registry, i.e. can add and delete a member
- loads and saves the members into a file
- can search and sort

- Member

Hobbies Class (Hobbies)

Class name: Hobbies
Collaborators:
Responsibilities:
- maintains the actual hobby registry, i.e. can add and delete a hobby
- loads and saves the hobbies into a file
- can search and sort

- Hobby

The User Interface Class (Display)

Class name: Display
Collaborators:
Responsibilities:
- handles all the text appearing on the screen
- handles all user input
(- doesn't know all the details of member, hobby or club)

- Member
- Hobby
- Members
- Hobbies
- Club