chap09 - Chapter 9 Implementing Association Relationships...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Object-Oriented Application Development Using VB .NET 1 Chapter 9 Implementing Association Relationships
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 2 Objectives In this chapter, you will: Identify association relationships on Bradshaw Marina’s class diagram Associate VB .NET classes in a one-to-one relationship Add functionality to the Boat class
Background image of page 2
Object-Oriented Application Development Using VB .NET 3 Objectives In this chapter, you will: Associate Dock and Slips in a one-to-many relationship Add the Boat and Customer classes to the Slip example Create and use an association class—Lease
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 4 Identifying Association Relationships on Bradshaw Marina’s Class Diagram Association relationships Show how instances of classes are associated, or connected, to each other Indicate that the system requires information about these associations Can be used to navigate from instance to instance following the association
Background image of page 4
Object-Oriented Application Development Using VB .NET 5 Identifying Association Relationships on Bradshaw Marina’s Class Diagram In a class diagram An association relationship Appears as a line connecting classes Multiplicity of the association Indicated by numbers written at both ends of the line
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 6 Identifying Association Relationships on Bradshaw Marina’s Class Diagram Association relationships in the Bradshaw class diagram: A customer owns a boat A boat is owned by a customer A boat is assigned to a slip A slip contains a boat A dock contains many slips A slip is attached to a dock A slip is leased to a customer (Lease is an association class) A customer leases a slip (Lease is an association class)
Background image of page 6
Object-Oriented Application Development Using VB .NET 7 Identifying Association Relationships on Bradshaw Marina’s Class Diagram
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 8 Identifying Association Relationships on Bradshaw Marina’s Class Diagram Lease class An example of an association class Exists because of the relationship between a slip and a customer In the class diagram Shown as a class connected by a dashed line to an association between Slip and Customer
Background image of page 8
Object-Oriented Application Development Using VB .NET 9 Associating VB .NET Classes in a One-to-One Relationship Association relationship between Customer and Boat Has two “directions” A customer owns a boat A boat is owned by a customer Each direction of the relationship Must be defined separately by the system developer Must be handled separately with VB .NET
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object-Oriented Application Development Using VB .NET 10 Associating VB .NET Classes in a One-to-One Relationship To implement an association relationship in VB .NET Use a reference variable as an attribute of a class A reference variable points to an actual instance
Background image of page 10
Object-Oriented Application Development Using VB .NET 11 Associating VB .NET Classes in a One-to-One Relationship
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/07/2008 for the course CSC 208 taught by Professor Walker during the Spring '06 term at Monroe CC.

Page1 / 39

chap09 - Chapter 9 Implementing Association Relationships...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online