Posts

Showing posts from March, 2020

Click of a Button

Image
The great thing about the internet is that it has brought the world closer to an unimaginable extent and everything is available at the tip of your fingertips. The internet has made our life so easy that people can literally make their living off of the internet. On the same basis making your travel arrangements has gotten easier. Standing in line for booking your tickets is a thing of the past. So, the project that our group has been working on is making a railway reservation system and in this blog, we will be discussing the booking of the ticket and the canceling of the ticket part. Booking the ticket The most important concept that we have applied in this part is the concept of inheritance . Just to give you a small recap, inheritance is the process in which one class inherits the data members of another class and can use the members without redeclaring them and creating a ruckus.  When you run the program, the window that first pops up looks like this 

A stop at the Inheritance station

Image
Here we are at the station of Inheritance! Typically in inheritance, there are two classes. Let us consider the analogy of parents and children. A child has few common traits like the same color of eyes, nose and ear shapes, etc same as their parents. The child has some common genes of their parent, it implies they inherit traits from there parents.  Following the example, the parent represents parent class or base class and the child represents the derived class. When a class inherits from another, it brings forward all the data that is being shared by the parent. Here is an example, class derived_class : visibility-mode base_class { // body of the derived class. } Where,  derived_class : It is the name of the derived class.  visibility mode : The visibility mode specifies whether the features of the base class are publicly inherited or privately inherited. It can be public or private.  base_class : It is the name

Trains - The Veins of India

Image
Moving on, let us find out how far our railway goes! Yes, Here come the scope and overview of the project.  This is the project which supports a social cause. People become tiresome by the offline work. This is the object-oriented approach for Railway Reservation System Design. Trains in India Majorly the system consists of two broad levels and three including minor level inheritance. The base class, moderator access class, and passenger access class. As we know in reality there are various levels of administration. Managers are having different levels of authority which reflects into privacy and access to the system. Here is the crude implementation of the system.  Base Class Moderator Class The ‘Base class’ is the first and topmost level of inheritance which stores the data of registree. Security care is taken while inheriting the data. ‘Moderator class’ indicated roles of moderator in the administration who have access to the details o