Objected Oriented Programming Concepts
OOPS is completely based on the concepts that are applicable in our day today life so that it is named as Object Oriented Programming System. Object Oriented with real time example:- As u know Object is the instance of class, Let consider ‘U’ (Sagar) as object where as ‘U’ belongs to the ‘Human being’ category and Every Human being has so many properties Name, Address and Gender etc.. Convert the same in Java programming language. Class HumanBeing() { String name; String address; String Gender; Integer age; } HumanBeing Sagar = new HumanBeing(); Next consider relation and interaction between different classes and Objects. Scenario 1: Ur mom told u brings ‘Onion’ from Vegetables market. Where U and Mom are the Objects belongs to the ‘HumanBeing’ Class and ‘Vegetables’ Market is another class have properties vegetable name, price, quantity and quality. Java: Class HumanBeing() { String name; String address; String Gender; ...