Software design: Lecture 20 - Sheraz Pervaiz

17 2 0
Software design: Lecture 20 - Sheraz Pervaiz

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Software design - Lecture 20. The main topics covered in this chapter include: relationships between classes; sample class diagram; improvement in the class diagram; reflexive association relationships; wrap-up discussion on class diagram;...

1 Software Design Lecture : 20 Relationships between Classes Ø Association –Discussed Ø Aggregation Discussed Ø Composition – Discussed Ø Generalization– Discussed in previous lecture,  Sample Class Diagram Improvement in the class Diagram Reflexive Association Relationships Ø Objects within the same class have a relationship with each other Ø A class is having association with itself – Recursive Relationship Course * is pre­requisite for * has pre­requisite of Reflexive Associative Relationship Ø It shows a relationship between super / sub class Ø Super Class and Sub classes are related by  drawing Arrow from sub towards super class 9 Ø A Directory may contain subdirectories 10 Abstract Class • • • • An Operation or Class is abstract if it has no  implementation Abstract Class cannot have any direct instances It can only exist in the context of inheritance  hierarichy Abstract classes are represented by writing class  11 12 Problem Statement Ø In  an  inventory  management  system  of  a  video  shop  there are items of multiple types i­e saleable and rentable  which  are  available  for  the  customer;  games,  VCR,  concession  items,  videos    Inventory  is  related  to  salelrentalineitem  and  purchaseOrderLineitems.  There  can  be  two  types  of  transactions  mainly  for  sale  and  rentalitems.  Both  type  of  transactions  are  performed  by  members  of  the  shop.  Transactions  are  managed  by  employees,  employees  belong  to  a  particular  store  Video Store – UML Class Diagram 1 Inventory RentalItem SaleItem Video ConcessionItem Game Transaction * Employee SaleTransaction * * 13 RentalTransaction * 1 Member * * SaleRentalLineItem * VCR StoreLocation Suplier * PurchaseOrder 1 * PurchaseOrderLineItem * 14 Wrap­up Discussion on Class Diagram 15 16 Task To Do: Ø Task : Write Scenario which generate diagram  given in next slide 17 Class Diagram Given ... Association –Discussed Ø Aggregation Discussed Ø Composition – Discussed Ø Generalization– Discussed in previous? ?lecture,   Sample Class Diagram Improvement in the class Diagram Reflexive Association Relationships

Ngày đăng: 05/07/2022, 14:02

Mục lục

  • A Directory may contain subdirectories

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan