Академический Документы
Профессиональный Документы
Культура Документы
Lecture 5
Object Orientation & Object Modelling Describe a system and its requirements by:
Identifying the objects in a system Identifying their processes (or methods, functionality) Identifying relationships between objects.
Many products are now described from this view The concepts of Object Oriented Modelling are used in the Business Object view of SAP
Lecture 5
What is an Object?
A tangible or visible thing. A construct which combines data and behaviour Examples of objects: Concrete: My bicycle, Myself Conceptual: A linked list, A polygon, An Account Business: Bank Account 34267 Invoice 98097 DVD s/n9870123 Customer (Alex) Example of Objects in a banking system: An Account A Teller A Branch A Customer A Transaction A Cheque
Lecture 5 3
Classification
Objects with the same attributes (data structure) and operations (behaviour) can be grouped into a class. A class is an abstraction that describes properties relevant to an application. Choice of classes is arbitrary. An object is an instance of a class.
Account
AcctName : string AcctBalance : currency
Methods
Object Name
attribute values Lecture 5
Joe Smith
$1234.00
Generalisation/Specialisation (is-a): A relationship between classes that identifies subclasses and superclasses. Subclasses can be mutually exclusive or overlap. The attributes and methods of the superclass are inherited by the subclass.
The triangle indicates a generalisation / specialisation relationship
Student
StudentID Name Address Course
Parent or Superclass
UnderGrad
Child, Subclass or Subtype
TimeFraction
Grad Student
DegreeType Supervisor Room
6
Lecture 5
Inheritance
Sharing of attributes and methods based on a class hierarchy. Subclasses inherit all properties of their superclass. In this example, what are the attributes of an UnderGrad? What methods do you think Student would have?
Student
StudentID Name Address Course
UnderGrad
TimeFraction
GradStudent
DegreeType Supervisor Room
Lecture 5
Association Relationships
The line indicates that any student record is associated with a course.
Course
CourseCode CourseTitle CourseDescrip CourseStructure
1 0+
Student
StudentID Name Address Course
Associations indicate that one commonly associates an object of one type with another object. Often with association, the associated classes are of different types of independent classes.
Lecture 5 8
Aggregation(is-a-part-of) or Composition (has-a): A special case of association. One object is composed of other objects. Each object in an association usually can not exist independently.
Order
OrderNumber OrderDate Customer
1 1+
OrderLine
PartNumber Quantity UnitPrice
The diamond indicates aggregation Note: Multiplicity can be shown as for associations
Lecture 5 9
Association Classes
Student
StudentID Name Address Course
0+ 0+
Subject
Subject Code SubjectTitle SubjectDescrip Credits
Subject-Enrolment
Semester Year Result
Lecture 5
Message Request
Sales Report
getTransData(Date) generateReport
Transaction
Amount Date Type
Lecture 5
11
Class Diagram
Branch Name Address Manager ChangeManager EditBranch
1
Works-at
1+ 1+
is-held-at
1+
is-made-at
1+
is-applied-by
1+
owns
1 1+
is-applied-to
1
0+
Account-Type Cheque Account Name Address Manager ChangeManager EditBranch Standard Savings Min Balance OverDraft ApplyOverdraft
Lecture 5
Methods
An operation that can be executed on the component These hold the functionality of SAP
Interfaces
Ensure consistency in the system and allow generic programming (The same name is used for the same action eg: IFEDIT).
Events
Status change of an Object that is published throughout the system.
Lecture 5 13
Lecture 5
14
An example of a specific objects definition. (SAGENCY) Available through SWO1 This screen also provides access to tools that allow the object to be extended or tested.
Lecture 5
15
This screen is the first screen one sees when testing an object type. To run a test you need to create an instance of the type. Select the instance tab, then use the search screens to find an agency.
Lecture 5
16
Here is a object of the type SAGENCY. Note the attributes now have values and the methods can be executed to see what they do.
Lecture 5
17
Lecture 5
18
Lecture 5
19
Lecture 5
20
S
Ledger
12 52 7 L edg er figure version
t rp ri
L edg er
e cial
se ledger
e c ia l le d g e r
se
e c ia l r se le d g e r - c m p a n y c d e-re la te d
i ed asset ledger
13062 Fi e d a s s e t le d g e r
This is provided to as an example of a BOM used in SAP. Use zoom in Power Point to view the detail.
Consolidation ledger
12523 C o n s o lid a tio n led g e r 12524 C o n s o lid a tio n le d g e r c o n s olid a tio n u n it-re la te d 12529 C o n s o lid a tio n le d g e r - c om p a n y c o d e-re la te d
Reconciliation ledger
14012 R e c o n cilia tio n le d g e r
e neral ledger
12107 V G e n e ra l le d g e r
Lecture 5
12525 C V S p e c ia l p u rp os e le d g e r - c om p a n yre la te d
12553 C V C o m p a n y s p e cia l p u rp o s e le d ge r
BA
e c ia l r se le d g e r tra n s a c ti n t e - a s s ig nm e n t
2 342 0 4 28 4 2 32 0 4
2 7 6 ( '&1
2 32 2 0 4 ) ( ( '&1
%# $ #
SAP
!
#" D
12535 C V Com pany code s p e c . p u rp os e le d g e r tra n s a c t. typ e 12534 C V Com pany spec. p u rp o s e le d ge r tra n s a c tio n typ e - a s s ig nm e n t
21
SA -ERM: No distinction is made between entity types and relationship types. Dependencies are laid out from left to right. Arrow notation is used to show links and cardinality.
1:1 (exactly one to one) 1:cm (Any number of dependants) 1:m (at least one dependant) 1:c (a maximum of one dependant)
Lecture 5 22
SA -ERM: Generalisation / Specialization uses the triangle: Business objects are used to give a high level view of data (and other) objects. Four types of relationship:
Hierarchy - a unilateral existential dependency between information objects Reference - a dependency between a reinterpreted entity and a primary entity. Aggregation - relationship types based on the classical ER model. Specialization - As for the classical ER model.
Lecture 5 23
Ledger
Controlling ledger
Special purpose ledger company code related Special purpose ledger company related
Company code special purpose ledger Company code special purpose ledger Ledger