Skip to content

Latest commit

History

History
66 lines (55 loc) 路 1.79 KB

File metadata and controls

66 lines (55 loc) 路 1.79 KB

Object-Oriented Programming in Python Flowchart 馃搳

This flowchart illustrates the key concepts covered in the second section.

flowchart LR
    A[Start Program] --> B[Main Menu]
    B --> C{Execution Mode}
    C -->|Sequential| D[Run Sequential Demos]
    C -->|Threaded| E[Run Threaded Demos]

    subgraph Sequential Execution
        D --> D1[Basic Class Demo]
        D1 --> D2[Inheritance Demo]
        D2 --> D3[Polymorphism Demo]
        D3 --> D4[Encapsulation Demo]
        D4 --> D5[Abstraction Demo]
        D5 --> D6[Print Sequential Execution Time]
    end

    subgraph Threaded Execution
        E --> E1[Create Threads]
        E1 --> E2[Start Threads]
        E2 --> E3[Wait for Threads to Complete]
        E3 --> E4[Print Threaded Execution Time]
    end

    subgraph OOP Concepts
        F[Basic Class] --> F1[Person Class]
        F1 --> F2[Attributes: name, age]
        F1 --> F3[Method: display]

        G[Inheritance] --> G1[Vehicle Base Class]
        G1 --> G2[Car Derived Class]
        G2 --> G3[Method Overriding]

        H[Polymorphism] --> H1[Animal Base Class]
        H1 --> H2[Dog, Cat, Bird Subclasses]
        H2 --> H3[Common Method: sound]

        I[Encapsulation] --> I1[BankAccount Class]
        I1 --> I2[Private Attribute: __balance]
        I1 --> I3[Public Methods: deposit, withdraw]

        J[Abstraction] --> J1[Shape Abstract Class]
        J1 --> J2[Circle Concrete Class]
        J2 --> J3[Abstract Methods: area, perimeter]
    end

    D1 --> F
    D2 --> G
    D3 --> H
    D4 --> I
    D5 --> J

    E1 --> F
    E1 --> G
    E1 --> H
    E1 --> I
    E1 --> J
Loading

Resources