Python Classroom Series – 17/Jun/2021

Object Oriented Programming

  • Class Diagrams:
    • Lets draw a sample class diagram of Company, Department and Employee (Without representing relationships b/w them) Preview

Association, Aggregation and Composition

  • Association: This represents the unidirectional or bidirectional relationship b/w two classes.

  • Associations are of two types

    • Aggregation: An object can exist even if the object of control class is dead (Company, Building)
    • Composition: An object also will be dead if the object of control class is dead (Company, Department) Preview
  • Lets create a Class Diagram for a Library

    • Librarian
    • Book
    • User Preview
  • Generally relationships b/w classes can be classified into two major categories

    • is-a
    • has-a: Represents aggregation/composition
  • Lets create a Class Diagram for Movie Booking

    • Movie
    • Theatre
    • Screen
    • User
    • Ticket Preview
  • Exercise: Create a Class Diagram For Bank with ATM for ATM Operations

    • Bank
    • Customer
    • Account
    • Teller

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin