Posts

Showing posts from February, 2020

OOP : A ticket to the Railway Reservation System

Image
When we start the implementation of any project, the first thing that comes to our mind is what are it’s elements! OOP is a concept which lets you explore minute intricacies of a system while also letting you create innumerable packets of similar elements.  Consider a train – the most amazing of all the modes of travelling, isn’t it? Let us explore this train and divide it into it's elements :   Train ––> Bogies ––> Compartments ––> Births ––> Upper/Lower . There can be multiple ways of dividing a train into it's sub-parts.  Similarly what parts can a Railway Reservation System have? We can have 1. Ticket booking 2. Enquiry 3. Ticket Cancellation 4. Seat Availability Status and what not! Amalgamating these using the wieldy concepts of OOP and the system is ready!  OOP will enable us to create classes and objects . A class is a blueprint and an object is an instance of that class. When you book a train ticket, you select the source, destination and t

Objects and Classes

Objects in OOP: Basically, as the name suggests ‘objects’ are the fundamental part of Object Oriented Programming. It is nothing but instance of a particular class. They can represent a place or a person or anything that a program has to handle. It is a piece of code which represent real life entity. The combination of both data and function into a single unit and these units are called objects. An object not only knows how to perform certain actions but also it can interact with other elements of the program.  At a time of object creation, we don’t require any keyword. We can directly pass values through the objects. An object consists of data member and member functions. Data members specify object’s state and member functions specify its behaviour. Without a class, object doesn’t exist, so basically an object is created from a class. We declare objects of a class with exactly the same sort of declaration similarly as we declare variables of basic types.  Objects not o

Why OOP?

Just as the name suggests this programming method uses objects. OOP aims to implement properties like inheritance, hiding, polymorphism, encapsulation, etc in programming. The main aim of OOP is to clamp together all the data and the functions that bind them so that no other part of the code can access a particular data except that prescribed function. It basically helps us to write more efficient code using way lesser lines than generally needed.  OOP is an archetype to design a program using classes and objects, it basically simplifies software development and maintenance. It is a method of solving enigmatic problems by breaking them into smaller problems using objects. Before OOP, programs were written like a procedure, in a step by step sequence, they were like a long list of instructions. But the OOP is about creating objects and classes that will interact with each other and perhaps form some kind of hierarchy among themselves for more efficient code. Advantage of OOP over P

A tour of Object-Oriented Programming

Walkthrough Welcome to this Blog Series. This is a part of the OOP course Home assignment based on our implementation of an OOP Design. Before heading towards the design, let us touch upon the importance of the OOP. Object-oriented programming is now the demanding technique in the coder community. Along with the user-friendly approach, exponential data mining gave birth to challenges for big data handling. ‘C’ as the primitive computer language, focuses more on procedural approach simplifying primary ways for problem-solving. Basically, it consists of writing computer understandable list of instructions that are organized as functions. It is much easier to access data. However, OOP treats data as a more sensitive element throughout the chain and does not allow it to flow freely around. Looking a bit inside, it all consists of small classes and objects just like microscopic cells in leaves. It may vary in size, shape but nothing will be outside a single cell. Mutually all ar