tutorial-6

tutorial-6 - Tutorial 6 – Class Driven Analysis...

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Tutorial 6 – Class Driven Analysis CSC2120&ERG3820 Prepared by Cai Yi(CY) • There is ONE WEEK for appealing (from March 8-15). Later appeal will NOT be accepted. • Please be honest to your marked papers. Any attempt to modify answers for higher scores will be severely punished ! • There are THREE students who did not attend the midterm exam. Please give your justification for your missing by this Friday (March 10) , otherwise your midterm grade will be 0! Outline • Class Diagrams • Example: – Constructing a Distributed Break Planner System • OO Modeling Class Diagrams • Class diagrams represent the structure of the system. • Class diagrams are used – during requirements analysis to model problem domain concepts – during system design to model subsystems and interfaces – during object design to model classes. Enumeration getZones() Price getPrice(Zone) TariffSchedule * * Trip zone:Zone price:Price Classes • A class represent a concept. • A class encapsulates state (attributes) and behavior (operations). • Each attribute has a type . • Each operation has a signature . • The class name is the only mandatory information. zone2price getZones() getPrice() TariffSchedule Table zone2price Enumeration getZones() Price getPrice( Zone ) TariffSchedule Name Attributes Operations Signature TariffSchedule Instances • An instance represents a phenomenon. • The name of an instance is underlined and can contain the class of the instance. • The attributes are represented with their values . zone2price = { {‘1’, .20}, {‘2’, .40}, {‘3’, .60}} tariff_1974:TariffSchedule Actor vs. Instances • What is the difference between an actor and a class and an instance? • Actor: – An entity outside the system to be modeled, interacting with the system • Class: – An abstraction modeling an entity in the problem domain, inside the system to be modeled • Object: – A specific instance of a class Associations • Associations denote relationships between classes. • The multiplicity of an association end denotes how many objects the source object can legitimately reference. Enumeration getZones() Price getPrice(Zone) TarifSchedule * price zone TripLeg * 1-to-1 and 1-to-Many Associations 1-to-1 association 1-to-many association * draw() Polygon x:Integer y:Integer Point 1 Has- capital name:String Country name:String City 1 1 Aggregation • An aggregation is a special case of association denoting a “consists of” hierarchy. • The aggregate is the parent class, the components are the children class....
View Full Document

{[ snackBarMessage ]}

Page1 / 39

tutorial-6 - Tutorial 6 – Class Driven Analysis...

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

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