DEV Community

silambarasan rajendran
silambarasan rajendran

Posted on

1

Day-05: Programming Paradigms

Program paradigms:
What is paradigm - conceptualize and structure the implementation.

Types of program paradigms:
Imperative – code directly controls execution flow and state change, explicit statements that change a program state
Declarative –
Concurrent programming –
Constraint programming –
Dataflow programming –
Distributed programming –
so on...

Source: https://en.wikipedia.org/wiki/Programming_paradigm

*** Let us discuss about OOPs Concepts from Imperative paradigm ***
What is Object and Class?

Class is like a blueprint or our imagination of how something should be.
Object is like the physical entity that exists in real life.

A class can exist without an object, but an object cannot exist without a class.

Real time Reference:
Alright, let's make it even simpler:

Class is like a recipe. It tells you how to make something.
Object is the thing you actually make from that recipe.
Enter fullscreen mode Exit fullscreen mode

For example:

Class: The recipe for making a cake.
Object: The actual cake you baked.
Enter fullscreen mode Exit fullscreen mode

You can have many cakes (objects) from one recipe (class), but you can’t have a cake without a recipe!

Image of Quadratic

Free AI chart generator

Upload data, describe your vision, and get Python-powered, AI-generated charts instantly.

Try Quadratic free

Top comments (0)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

If this post resonated with you, feel free to hit ❤️ or leave a quick comment to share your thoughts!

Okay