This document discusses object-oriented programming concepts like class diagrams, encapsulation, inheritance, polymorphism, and relationships between classes. It provides examples of how to model an e-commerce system using classes, class attributes, and methods. It also describes how to extend the class diagram to add user states like new, active, and banned, as well as order statuses for tracking order fulfillment. The document is a lecture on object-oriented design patterns and modeling real-world systems using classes and relationships.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
73 views22 pages
11-Class Diagram
This document discusses object-oriented programming concepts like class diagrams, encapsulation, inheritance, polymorphism, and relationships between classes. It provides examples of how to model an e-commerce system using classes, class attributes, and methods. It also describes how to extend the class diagram to add user states like new, active, and banned, as well as order statuses for tracking order fulfillment. The document is a lecture on object-oriented design patterns and modeling real-world systems using classes and relationships.
AGGREGATION DESCRIBE A “HAS A” RELATIONSHIP A customer has a address A car has a engine A bank has many bank accounts A university has many students
OBJECT ORIENTED PROGRAMMING BY ROHAIL QAMAR 18
AGGREGATION AND COMPOSITIONS
OBJECT ORIENTED PROGRAMMING BY ROHAIL QAMAR 19
CLASS ACTIVITY E-COMMERCE 1. For the above Class-Diagram, list the class name, any two class data members, and member functions. 2. Suppose E-commerce wants to add the provision of User state can be new, active, and banned the current system. Extend the Class-Diagram to the model for this addition. 3. Further extend the system for adding the class Order status can be new, hold, shipped, delivered, and closed.
OBJECT ORIENTED PROGRAMMING BY ROHAIL QAMAR 20
OBJECT ORIENTED PROGRAMMING BY ROHAIL QAMAR 21 THANK YOU