From: shoa on
Hello

I want to create a simple class diagram for an "Add job" use case (a small
part of a system) . In this, Client can offer a job or many jobs

suppose that I have ClientPanel, that can show all jobs that a client can
offer

So I have 4 classes:

JobList class: -entity class
-getAllJobs();
-addNewJob()
-deleteAJob()
-changeJobDetails()

ClientPanel class: -boundary class
-getClient();
-setClient();
-showClientDetails()
-displayJobList();
-displayNewJobDialog()

NewJobDialog class -boundary class
-verifyInput();
-createNewJob();

Job class: -entity class: -suppose that there are only Job name and job
category.
-create();
-setJobName();
-setJobCategory();
-getJobName();
-getJobCategory();

So the relationship among classes as:

JobList ----- Job
| |
| |
ClientPanel --- NewJobDialog

As ClientPanel is used to present a JobList of a client, so there is
relationship between ClientPanel and JobList classes
A NewJobDialog can be presented through a ClientPanel (click a button),
there is relationship between ClientPanel and NewJobDialog
A Job is created through NewJobDialog so there is relationship between Job
and NewJobDialog
A JobList may have a variable Job class in it so there is relationship
between Job and JobList

Could you please tell me those relationships are wrong or right??? Do I miss
a relationship??

Many thanks
S.Hoa


From: H. S. Lahman on
Responding to Shoa...

> I want to create a simple class diagram for an "Add job" use case (a small
> part of a system) . In this, Client can offer a job or many jobs
>
> suppose that I have ClientPanel, that can show all jobs that a client can
> offer
>
> <snip classes>
>
> So the relationship among classes as:
>
> JobList ----- Job
> | |
> | |
> ClientPanel --- NewJobDialog
>
> As ClientPanel is used to present a JobList of a client, so there is
> relationship between ClientPanel and JobList classes
> A NewJobDialog can be presented through a ClientPanel (click a button),
> there is relationship between ClientPanel and NewJobDialog
> A Job is created through NewJobDialog so there is relationship between Job
> and NewJobDialog
> A JobList may have a variable Job class in it so there is relationship
> between Job and JobList
>
> Could you please tell me those relationships are wrong or right??? Do I miss
> a relationship??

The classes represent your solution thus far and you are asking for
advice whether the relationships are valid, which is a fundamental OOA
issue that depends on the problem space and requirements. There is no
way to judge the solution without knowing what the problem is. What we
need is the use case itself and a brief problem description for context.


*************
There is nothing wrong with me that could
not be cured by a capful of Drano.

H. S. Lahman
hsl(a)pathfindermda.com
Pathfinder Solutions -- Put MDA to Work
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
(888)OOA-PATH