Skip to content


Kevin Brightwell edited this page Aug 26, 2015 · 1 revision
Clone this wiki locally

Sample modelling problems to help people learn to model in Umple

Problem 0a (extremely simple): Create a class diagram for the following

Develop a class diagram for students registered in ski lessons. Each ski course has a start and end time, a coach and up to 10 students. Students and coaches are both persons, so have a name and phone number.

Problem 0b.

Add a main program to your example from problem 0a, that will instantiate an instance of each class, and print out data about each object. See the Hello World examples in the user manual for an example of how to create a Java main program.

Problem 1: Create a class diagram for the following

Develop a system to help teachers and trainers guide students as they gain expertise in some skill such as playing a musical instrument or learning a martial art. Each skill has a series of steps that the learner must master (e.g. martial arts have a series of coloured ‘belts’, with sub-steps between each belt; learning the piano has a series of ‘grades’).

The system would be web based. Users would include: ‘Super-Experts’; ‘Trainers’; ‘School Administrators’; ‘Students’ and ‘Parents’.

Super-Experts would use the system to establish a new skill with its steps and sub-steps. Each step and sub-step would have a detailed list of capabilities to be mastered. School Administrators would register their school as a user of the system, and would add Trainers that work at that school, and classes students can take (A trainer is assigned to each class). Students can sign up for classes (which must be at a certain time each week, with a start and end date) or for private lessons with a Trainer (which can be at the school, at the students’ home or at the trainers’ home). Parents can do everything a student can do, on behalf of children under the age of 14.

Problem 2: Create a class diagram for the following

You are starting an outdoors services business. In the summer your employees will be mowing lawns and in the winter they will be clearing snow. All year round they will be trimming trees. Some employees can do all three tasks; however since trimming trees requires specialized training, not all employees will be able to do it.

Customers will be signing contacts with your company for each of the tasks. For snow clearing you will be charging $1 per square meter of snow cleared per visit, and for lawn mowing you will charge 5 cents per square meter. You give a 50% discount for people willing to sign up for regular snow clearing or lawn mowing for an entire season.

Each day you dispatch crews to do the required work. Employees have to sign out snow plow trucks, snow blowers, shovels, lawn mowers and tree trimming kits. Tree trimming is always done in crews of two people; snow clearing is always done individually.

Problem 3: Create class and state diagrams for the following

The Canal Monitoring and Control System is used to automate canal locks in response to water craft that want to pass through a canal system. The system can be installed in any network of canals. Each canal is divided up into segments. Each segment has two ends which can either be a bend, a lock gate, a low bridge, or a system entry/exit point (where boats can move to or from other waterways such as rivers and lakes). A special kind of canal segment is a lock. The water level in a lock can be raised or lowered so its height matches the height of an adjacent segment. Several locks can exist side by side (as in the Rideau Canal next to Parliament Hill in Ottawa). A low bridge is a location where the bridge needs raising for a boat to pass. A bend is simply a place where the canal changes direction - keeping track of these helps simplify mapping of the system.

The system keeps track of the GPS co-ordinates of each segment end, the height of the water above sea level in each segment (which can change in locks), and optionally a name given to a series of locks or segments.

Each water craft using the system must have a transponder. The transponder includes a GPS unit and transceiver. When the captain of a craft wants to travel through the system, he enters his plannned destination in the transponder. The size of the boat is also tracked. The transponder regularly transmits the location of the craft to the control system so the control system can monitor traffic.

When a craft reaches a gate, the system knows it is there and needs to pass through since it has received the data about the desired destination. The control system takes care of opening the gate, raising or lowering of the water level, and then opening the next gate, etc. When a boat reaches a low bridge, a similar procedure takes place, except that raising or lowering the water doesn't happen.

When there are a lot of boats, the system makes several of them queue up so they can pass through a lock or low bridge at the same time. The system has, however, to ensure that only the right number and size of boats are put into a lock at once, so the lock doesn't become overly full (the system knows the size of each lock). Complicating matters is the fact that there will be boats travelling in both directions.