1. Class & Object to create Work Process
- Puneet Malhotra
- Nov 7, 2024
- 4 min read
Updated: Jan 8
Quick Recap: 🔁
Class, in actuality, is a translation of a physical or functional business process. When we outsource any work, we create a SOP (Standard Operating Procedure) to guide human beings in their tasks. Similarly, a class is simply a translation of a SOP to guide computers in their tasks.
Click below to understand physical significance or basic ideas of Class , Object and Attributes.
Functional Significance of Class and Object
Let's start from this question - What is an Automation? ▶️
Use of anything to perform any Task without human involvement, is an automation. Coffee Maker machine is an example of an automation.
We make Computer to do our work and that's called an Automation. If we make any person to do work , we call it outsourcing.
In both cases we create a process and delegates our work to be performed without our direct involvement.
Let's try to see kind of automation in Real Time Business Scenario
Let’s assume the situation where the owner of the same bakery ,that we discussed in previous topic, handles everything himself—billing, baking, cleaning, and marketing. He’s the sole person managing all aspects of his business.

After some time, his sales start to rise, and his business grows 📈. Now, managing everything alone has become difficult.
What does he need? 🙆 Staff—to handle parts of the work independently.
📌 He decides to hire a bakery chef to take over the baking and first hence step toward automation begins.
Baking work to be outsourced
Before going for hiring new chef, what does he need first? - a process (or SOP-Standard Operating Procedure) to train his new staff.
Business owner ,taking charge of Manager 👮, is not technically good so he created a hand written business process to train new chef.
He starts with:
Tasks (Functions) a chef can do:
Accept order
Manage kitchen Inventory
Bake ordered Items
Deliver ready items
Checks or Validation:
Don't accept order directly from customer
No spoiled Items
Follow bakery's recipe to prepare items
After finalizing, first Blue Print or Process is ready and it looks like below and can be implemented by any chef. (check previous topic to know why Class is called as Blue Print)

With everything in place, he begins a hiring drive to bring in a chef.
He hires one, and on the chef's first day, he hands over a written process as part of training.
The chef, being a professional, understands and follows the process smoothly.
Perfect! Seems like everything is on plate to kickstart.
Time to get down to business! 😊
First Order arrived:

Taking Order_1 : Implementing "Baking Process"
Order_1.status = New
Order_1.Quantity= 2
Order_1.Item = Veg Burger
Order_1.receipe = Asian_Burger
Order_1.Preparation
isVeggiesAreFresh = Yes
Order_1.status = In Process

Taking Order_2 : Implementing "Baking Process"
Order_2.status = New
Order_2.Quantity=1
Order_2.Item = Sandwich
Order_2.receipe = Fresh_Breads
Order_2.Preparation
isVeggiesAreFresh = Yes
Order_2.status = In Process
Meanwhile: Chef Prepared Order_1 so he set Order_1 status as Ready (=Order_1.status)
Manager is regularly checking status : and when he sees Order_1.status =Ready he picked the order and gave it to customer and set the status Order_1.status =Delivered
Now, let’s refer back to the first image about OOP we discussed in the previous topic and answer the following questions:
What is the Class or Object identified in this outsourced work?
Why is a Class Called a Blueprint?
What is an Object Treated as in the Real World?
📌 In reality, a Class represents a defined Process, and an Object is the Implementation of that process.
Objects are 'live' entities because they bring the blueprint (class) to life through their execution. They behave according to the instructions laid out in the class, which is why an object is often referred to as a 'living thing' in the world of programming.
I believe you are able to understand the concept of Class and Object from daily life work process, without using technical jargons.😀
Functional to Pseudo code
Now try to write Pseudo code of above scenario to translate functional Process into technical Class structure
// Class: BakingProcess represents the blueprint for handling bakery orders
class BakingProcess {
// Variables for storing order details and enabling communication
Text Order_status;
Number Order_Quantity;
Text Order_Items;
Text recipe;
// Function (method) to prepare the order
function Preparation() {
if (VeggiesFresh) {
Order_status = "In Progress";
} else {
Order_status = "Denied";
}
}
// Function to take a new order
function TakingOrder() {
// Code to accept order details
}
// Function to check kitchen inventory
function inventoryCheck() {
// Code to check stock of ingredients
}
}
Thought-Provoking
How did the concept of Class and Object come into play?
Problems arrived first:
How can staff or resources execute business processes without direct supervision?
How can we effectively prepare staff to delegate the work?
Solution Identified :
A predefined process serves as the foundation for training and execution.
Design Approach:
Process should have -
What to do
Things to keep ready before work starts
How to provide input ,if any work requires, and take output for reporting or record maintaining.
Click to Learn ➡️ Inheritance - Control Business with Centralized Approach
DIY 🤹🏽🤹🏽
Create your own Class and Object using Physical work process.
Assume any task you want someone to perform for you on a daily basis without your participation and ensure the following:
Person should be able to perform activity without asking what to do.
He should be aware of things to do before start of work.
You should have ability to give input and ask output at run time of work.
Comments