Re: Can this Class be cleaned up at all?



Lew wrote:
(alot of great stuff for me to consider)

Here is my spec.

Requirement: A GUI system that will interface with an Oracle Database to allow for the staffing of a medium-large to large IT firm. Employees can be
a) Added
b) Promoted
c) Fired
d) Assigned to a team
e) Benched

An employee has the ability to
a) Call in sick
b) Take a vacation

There are
a) Employees (many)
b) Managers (1 per team)
c) Directors (1 per logical grouping of teams)
d) CIO (1)
e) CFO (1)
f) CEO (1)

The following deparments exist
a) Current projects
b) New projects
c) Bench
d) Finance/HR
e) Advertising
f) Facilities

Each of the departments has between 1 and 5 teams (Bench is where employees sit while waiting for assignment)


Everyone in the company is an employee at the very lowest level. Each employee has the following characteristics

a) A name
b) An employee number
c) A date of hire
d) An initial salary
e) A job title

There's much more to the spec, but I thought starting at the lowest level of Employee would be the most efficient. I'm also working on a Use Case diagram as well, but without the GUI programming skills that I need, I'm holding off on the Interface side of the project for a while.

A noun is a Class
A verb is a Method

This isn't always true, but I have defined the following nouns

Employee
Manager
Director
CIO
CFO
CEO

I'm not sure what to do about the department yet. I was thinking about creating a Department class that is simply an ArrayList of Employee. That way I can have both normal employees and Managers in it.
.



Relevant Pages

  • Re: Design Pattern Question
    ... but Proxy is pretty much designed for restricted or selective access. ... interfaces for Employee that only provide X, X+Y, or Z access. ... one "hard-wires" the appropriate interface for each client. ... I would like to explore this design further. ...
    (comp.object)
  • Re: OOP object collections
    ... interface for the business object. ... string ZebraName ... private System.DateTime _createDate; ... and a Employee class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: OOP object collections
    ... interface for the business object. ... string ZebraName ... private System.DateTime _createDate; ... and a Employee class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: design problem
    ... Revealing the existence of strategies, both interface and each ... and the fact that employee has only one payment model ... that you need to have many payment models active at the same time for the ... need to move employees from one payment model to another, ...
    (comp.object)
  • Re: Design Pattern Question
    ... Assume an employee application at a work place. ... a priori I would regard this as a trick question because there is a much easier answer than design patterns. ... The available interface then prevents the client from accessing properties it shouldn't because they are not defined in that interface. ... In that situation the dynamics of the relationship are too complex to express with a simple association because of the substitution. ...
    (comp.object)