Looking for a Tutor Near You?

Post Learning Requirement »
x

Choose Country Code

x

Direction

x

Ask a Question

x

x
x
x
Hire a Tutor

Introduction To Class And Objects

Loading...

A brief description to the fundamental concepts of Object Oriented Programming

Lakshmi M / Kochi

5 years of teaching experience

Qualification: M.Tech in Computer Science and Engineering

Teaches: Computer, EVS, Mathematics, Science, Computer Science, School Level Computer, B.Tech Tuition, M.Tech Tuition, C / C++, C# (C Sharp), Python Programming

Contact this Tutor
  1. Class and Object Presented by Lakshmi M B
  2. Contents • Introduction What is Object? What is Class? Syntax Difference between Class and Object
  3. Introduction Object Oriented Programming (OOP) languages has 2 fundamental building blocks: classes and objects. OOPs allows us to create reusable blocks of code called objects. OOPs allows to break a large program into smaller piece of codes which is easier to understand and maintain.
  4. What is Class and Object?
  5. What is Object? Object -5 a real world entity which has unique properties and behaviors. It can be tangible or intangible. Ex: apple, mango, pen, mobile, car, etc. are tangible objects and bank accounts are intangible objects.
  6. What is Class? Class a blueprint for creating objects. • It is a group of objects that has similar properties and behaviors. Class Object 1 Object 3 Object 5 Object 2 Object 4 Object 6
  7. Each class has its own attributes, objects, and methods. • Attributes -Y What the class looks like? • Objects -Y What the class is? Methods What the class does?
  8. Constructor -5 methods with the same name as that of the class and it is used to initialize the objects of this class. Class name should always start with a uppercase letter whereas object name should always start with a lowercase letter.
  9. Examples Class 1. Living Things Human 2. 3. Student 4. Anima( Fru it 5. 6. Mobile u Object 1. Human, Anima( 2. Man, Woman 3. -rom, Susan 4. Dog, Cat, Cow 5. Apple, Banana 6. iPhone, Samsung
  10. Class: Student Class: Fruit
  11. Properties Behaviors Name Age Gender Roll No Read Write Study Dance Studentl
  12. Syntax (in Java) class ClassName{ // class declaration field; method; ClassName objectName = new ClassName(); // object creation
  13. https://www.programiz.cowvjava -programming/ online - compiler/_
  14. Difference between Class and Object 1. 2. 3. 4. 5. Class A blueprint or template for creating objects. A logical entity. A class is declared once. Does not occupy memory location. Can exist without any objects. I. 2. 3. 4. 5. Object An instance of a class. A real world or physical entity. Multiple objects are created. Mevnory is allocated when object is created. Cannot exist without any class.
  15. N/A