--- Video Title: Object Oriented Design Description: Object Oriented Design Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Arnab Chakraborty, Tutorials Point India Private Limited --- In the previous video, we discussed about the function oriented design. So, in this video we are concentrating on object oriented design, which is one of the most popular design approaches. So, object oriented design, in short it will be called as OOD, works around the entities and their characteristics instead of the functions which are involved in the software system. So, this design strategies focuses on entities and its respective characteristics. So, what are the characteristics are there and what are the entities can do, we are considering that one in our object oriented design approach. And the whole concept of software solution revolves around the engaged entities. So, now let us see the important concepts of object oriented design. So, what are the important concepts we are having? The first one is object, whatever is getting done is by one object. So, object, all entities involved in the solution design are known as objects. So, all the entities should be considered as an object. For example, person, banks, company and customers are treated as objects. And every entity has some attributes associated to it and has some methods to perform on those attributes. So, in case of objects we are having some set of attributes which will be holding some set of data and methods are also will be there in the objects which will decide that what are the permitted operations that you can carry out on those attributes on those values. Next one we are going to discuss they are classes. So, a class is a generalized description of an object. So, it is a blueprint of object. An object is an instance of a class. We know that an object is an instance of a class that is instantiation of a class will be known as an object. Whenever we are using this term instantiation or instance, that means, we are allocating some memory space to hold our data and the respective methods which will decide what are the permitted operations that can be carried out on the data. So, class defines all the attributes which an object can have and the respective methods which defines the functionality of the object. In the solution design, attributes are stored as variables and functionalities are defined by the means of methods or also known as procedures. Next one, a very important concept that is encapsulation. In object oriented design, the attributes that is the data variables and the methods that is the operations on data are bundled together is called the encapsulation. This attributes, this data set and the respective methods that is the functionalities on those data will be bundled together and that will be known as the encapsulation. Encapsulation not only bundles important information of an object together, but also restricts access of the data and methods from the outside world and this is called information hiding. So, what will be the methods? What are the methods that can be accessed, that can be viewed from the outside? What are the variables that can be viewed or accessed from the outside? So, this accessibility would also be defined in this respective classes. So, as a result of that this encapsulation means, those data which will remain hidden, those method which will remain hidden, within that respective class will also emphasize the concept of this encapsulation. So, encapsulation means the set of attributes and the permitted operations in the form of methods or procedures will be bundled together and that is known as the encapsulation. So, what are the attributes, what are the methods that can be accessed or cannot be accessed from the outside of the class that we can also mention explicitly. We are having the next one that is the inheritance. So, object oriented design allows similar class classes to stack up in the hierarchical manner, where the lower or the subclasses can import, implement and the reuse the allowed variables and methods from the immediate super classes or the base classes. This property of object oriented design is known as inheritance. And this makes it easier to define specific class to create generalized classes from the specific ones. So, also this inheritance actually, this inheritance also emphasizes the reusability of the programming code. So, what will happen? We will be having one super class or the base class from where the properties and attributes can get inherited onto the subclasses or onto the derived classes. So, that there is no need to define each and every class individually. We can inherit some properties, some methods from the base classes to the derived one. So, here in this particular diagram, we have shown some different types of inheritance as possible. So, this is the base class, say let it be class class A. This is our derived class or the subclass. So, we can call it as class B. So, it is known as simple inheritance. So, now here you see, this is our base class or the super class class A. It has got inherited in the subclass that And that is about Class B. And Class B is the superclass of Class C. And Class C is the subclass of Class B. So, this is known as Multi-Level Inheritance. So, here you can find, this is a Hierarchical Inheritance, because these two classes are inheriting from the respective only one best class. So, that is one as Hierarchical Inheritance. So, in this way we have demonstrated, we have shown you the different types of inheritedances are possible. Next one is the polymorphism. So, object-oriented design language provide a mechanism where methods performing similar tasks, but vary in the arguments and can be assigned with the same name. Differing methods with the same name, but they are differing in the arguments. Either the number of arguments are differing or the argument data types. This is called the polymorphism, which allows a single inheritance performing tasks for different types, depending upon how the function is getting invoked. So, respective portion of the code gets executed. In case of inheritance, it might be true that we are having multiple functions with the same name, but there will be no ambiguity. So, depending upon the parameters passed, the depending upon the arguments or the data type of the parameter or the number of parameters or the respective sequences, it will decide that which specific method we are going to call. So, there will be no ambiguity, even if we are having the polymorphism. Consider this one. This is a case of inheritance. You see, there is one class. There is a best class or super class name of the class is shape. And here we are having this method. The method is our draw. We have inherited onto this line, triangle, rectangle and circle. This draw method, it has got inherited here. And they may have some different bodies functions also the function may get overridden. So, now, we are having the design process. So, software design process can be perceived as series of old defined steps, though it varies according to design approach. So, function oriented or object oriented it, yet it may have the following steps involved. So, let us discuss what are the specific steps with the help of which one software can be designed. So, a solution design is created for from the requirement or previous use system and or the system sequence diagram. So, at first we shall go for a solution design. From the previously built system we might be having some idea or and or or system sequence diagram the solution system will be a design solution will be obtained. Next one is the objects are identified and grouped into the classes on behalf of similarity in attribute characteristics. So, we can find that these these are the set of attributes. These are the set of attributes which are common in multiple objects. And these are the objects which are similar in nature. So, those objects will have a class under which these objects will get instantiated. So, class hierarchy and the relation among them is defined. And then application framework is also defined on which this application and the software is going to get implemented and developed. So, in this way we have defined what is object oriented design. So, in our email tutorial also we have discussed this object oriented analysis and object oriented design into more details. You can also watch that tutorial also. Thanks for watching this video.