Uml 2
Uml 2
PART-A
3. Identify any inheritance relationships among the classes and draw the
class diagram representing inheritance relationships.
4. Identify any association relationships among the classes and draw the
class diagram representing association relationships.
Ans
Classes:
Subscription
Stock
Shipping
Customer
Music
Books
Subscription
Create_account();
Update_Info();
Delete_Account();
Stock
Add();
Update();
Search();
Delete();
Shipping
Verify();
Deliver();
Confirmation();
Customer
Enquire();
Purchase();
Pay();
Music
Artist();
Search_Music();
Review();
Play();
Pause();
Books
Title();
Stock_Amount();
Add();;
Update();
Deliver();
PART-B
Ans
Example: CAR, TRUCK generalized into VEHICLE; both CAR, TRUCK become
subclasses of the superclass VEHICLE.We can view {CAR, TRUCK} as a
specialization of VEHICLE .Alternatively, we can view VEHICLE as a
generalization of CAR and TRUCK.
key difference
1. Generalization is the result of computing the union of two or more
entity sets to produce a higher-level entity set. It represents the
containment relationship that exists between the higher-level entity
set and one or more lower-level entity sets.while Specialization
constructs the lower level entity sets that are a subset of a higher level
entity set.
2. Arrow pointing to the generalized superclass represents a
generalization while Arrows pointing to the specialized subclasses
represent a specialization.
3. We do not use this notation because it is often subjective as to which
process is more appropriate for a particular situation while in
specialization We advocate not drawing any arrows in these situations
Ans
Ans
There are two broad caetgories of diagrams and then are again divided into
sub-categories:
• Structural Diagrams
• Behavioral Diagrams
Structural Diagrams:
The structural diagrams represent the static aspect of the system. These
static aspects represent those parts of a diagram which forms the main
structure and therefore stable.
Structural Diagrams
Behavioral Diagrams:
Any system can have two aspects, static and dynamic. So a model is
considered as complete when both the aspects are covered fully.Behavioral
diagrams basically capture the dynamic aspect of a system. Dynamic aspect
can be further described as the changing/moving parts of a system