Home
Username:
Password:
UML Tutorials

Object Diagrams / From Class Diagram to Object Diagram




Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.


Learn More

Subtitles of the Movie

This movie takes you from a class diagram to an object diagram showing how object diagrams can help you explore and elaborate on the information in a class diagram. Object diagrams are useful for capturing how objects in a system look at a particular point in time, showing sample configurations of objects. Object diagrams let you explore complex relationships between classes and as such object diagrams can also help you create or clarify classes and their possible associations. In this example of a class diagram you can see we've identified three classes and these are related to a school or an educational system. We have a course which is composed of sections, we also have a student class. As you can see from the various associations a student takes a course and a student, one student can take anywhere from zero to six courses. One course can be made up of many different sections and each section has three to 20 students. So you can see there is a limitation there on the number of students who can be in a section. So in starting to think about how the objects in these classes might relate to each other we can look at an object diagram that shows instances of the various classes that exit in the class diagram. So you see our classes here, we have student and various objects from that class, we have the section class and we have in this example two instances of the section class and we have one instance of the course class. So in looking at this diagram you can see that, the course object, called Shakespeare has multiple sections, two different sections and the students can have various relationships to those sections. For example this student here, Jill Hickson, is enrolled in the class. It's also possible for one student, George Butrose, in this example to be enrolled in a section and wait listed for another section. Perhaps section one is a Monday morning at eight o'clock so he's in that section but he's waiting for section two which will let him sleep in. You can also have a student auditing a section, taking a course but not for credit. Other possible relationships between student and section include, over here, Lynn Brown is a student but she is a teaching assistant for this section. So she would be in a different relationship to the section then the student who is enrolled in that class. And similarly the college might have a program of writing fellows who are taking a class not for credit but to assist other students who are enrolled in the class with writing their papers. So as you can see even though we have a class called student once we start looking at objects within the student class we see that there are a number of different possible relationships between objects in the student class and objects in the section class. So back in our class diagram we have one student takes zero to six courses, one section of the course has three to 20 students but when we start looking at instances of the student class in our object diagram we find that the relationship between student and section can be quite complex and can mean a number of different things. Object diagrams can be helpful in illustrating aspects of the system to those who find class diagrams a little abstract, and as you see from this example they can also help you discover possible new classes or clarify various kinds of relationships between classes.

Tutorial Information

Course: UML
Author: Nancy Conner
SKU: 33815
ISBN: 1-934743-23-2
Release Date: 2007-10-26
Duration: 7 hrs / 95 lessons
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available