An example of some work I have done using the UML.


Click on the links below to see the examples. The diagrams were generated using Together Control Center 5.5 and 6.0.

Class diagram

Sequence diagram

Activity diagram

The problem statement describes a control system for a circle irrigation sytem.

Control System Operation

The Circle Irrigation Control System uses sensors and on the sprinkler arm pivot to measure water flow, temperature and humidity;, and sensors in the soil to measure soil moisture, and nitrogen content. The central computer system polls each irrigator every ten minutes, checking for any sensors that are sending an alarm. When one or more alarm(s) is received from an irrigator, the control system does the following:

1) Decides what actions to take - turn the water on or off, or turn the fertilizer on or off, or both, based on which sensors are sending alarms. If the alarm is from an irrigator with a scheduled action, the decision whether to take the action immediately or to wait (see steps 2. and 3.) is re-visited. Based on the results of the decision-making process, the central computer may signal the circle irrigator to turn water flow on or off, to turn fertilizer flow on or off, or to do both. Of course, the flow of water and fertilizer are not independent; fertilizer may not be turned on while no water is flowing through the system.

2) Makes a calculation to optimize water and fertilizer consumption - this involves deciding whether to take action immediately or wait. Optimal use of water, in particular, can depend heavily on the time of day, since temperatures can be expected to drop during the night, making it necessary to use less water to achieve the same effect on the crop.

3) If the decision is to wait, the sensors for the irrigator are reset, and the action is scheduled for a time ten minutes in the future. The decision is revisited during each polling cycle.

4) Sends the appropriate signals to the irrigator.

Controls

There are two controls on the pivot point; one to turn the water on and off, and one to turn the fertilizer on and off. The controls have no "intelligence" - they turn on or off based on signals sent from the Circle Irrigation Control System.

Sensors

There are several sensors connected to the Circle Irrigation Control System for each circle. There are air temperature and humidity sensors on the pivot point and soil moisture and nitrogen content sensors in the soil of the circle. When a sensor is turned on, it must have its range set if the desired range is different from the factory-set default range, and it must be told to start sampling. An alarm is sent when the quantity being measured goes out of the set range, and sampling stops. The sensor must be reset to continue sampling with the same range; otherwise, it continues sampling in a factory-set default range when the alarm is acknowledged.

The following is a UML activity diagram describing this system.

back to top

Problem Statement: Small Consulting Group
The Small Consulting Group delivers information systems consulting services to a variety of customers. The Group can provide Project Manager, System Architect, Software Engineer, and Software Tester skills. Each type of consultant skill is billed at a different basic rate, according to the following rate structure:

Project Manager: $250/hour
System Architect: $200/hour
Software Engineer: $150/hour
Software Tester: $100/hour

The rates above are discounted based on the length of engagement contract the client is willing to commit to:

Ten percent discount for medium-term (six month - one year) contract
Twenty percent discount for long-term (over one year) contract
No discount for contracts less than six months.

Consultants may be working for more than one customer at the same time. In the case of Staff and Principal consultants, they may also charge their non-billable time to an account called "Business Development", which is time spent helping the Group obtain new clients.

Consultants are compensated on three different plans:

1) Hourly consultants are paid strictly for hours worked; they receive no vacation, sick leave or paid holidays.
2) Staff consultants are paid a fixed weekly salary with ten percent compensation for billed hours over 40 per week; they receive vacation, sick leave, and paid holidays.
3) Principal consultants are paid a fixed weekly salary with a bonus of ten percent per hour for every billed hour; they received vacation, sick leave, and paid holidays.

You have been hired to design a software system that will automate the processes of billing clients and paying the consultants every month. These processes may only be performed by authorized persons.

The business process for determining the billable hours for a consultant is as follows:

The consultant records her/his hours for the current week for each client on a time card. Staff and Principal consultants must also record sick leave, vacation, and holidays and "Business Development" hours for each week.
After obtaining the signature of the client representative, verifying the hours worked, the consultant sends the hours to the Small Consulting Group office manager.

The office manager records the billable hours worked by each consultant on each engagement, together with the rate at which the client(s) are to be billed. At this point, the office manager also records the "Business Development" hours for each Staff and Principal Consultant.

The business process for billing Small Consulting Group Clients is as follows:

The office manager directs the billing administrator to prepare invoices for each client.

The billing administrator prepares an invoice for each client, base on the billable hours recorded by the office manager. Each client invoice begins with the normal client name and address information at the top of the page. The invoice then contains a line item for each consultant who performed work for the client during the past month. Each line contains the consultant's name, her/his billing rate, and the total bill for the consultant. The invoice ends with the total billed amount for the past month.
The billing administrator prints each invoice with a matching envelope, stuffs the envelopes, and mails the invoices.

The business process for paying consultants is as follows:

The office manager directs the payroll administrator to prepare the payroll checks.
The payroll administrator prepares a check for each consultant due compensation for the past month, based on the type of compensation plan for the given consultant, and the number of hours worked.
Each check must contain the name and address information for the consultant, the number of hours worked, the hourly rate, any overtime or bonus pay, the gross pay, any deductions, and the net pay.
Checks are not printed by the payroll administrator; the payroll data is sent to a check printing and mailing service for this purpose.

The following two diagrams address the problem stated above.

Sequence Diagram:

back to top

Class Diagram:
back to top