Introducing Java Object Oriented Programming Concepts
OOPC-Object Oriented Programming Concepts
1. Object
2. Class
3. Method
4. Variable
Standards
Coding Standards for Classes Usually class name should be noun starting with uppercase letter.
1st Letter Uppercase - Car
1st Letter Lowercase - car
Parameter List - car()
Operators
Operators are used to perform operations on variables and values.
. Dot Operator
= Assignmental Operator - Here the substitution is done.
== Equalization Operator - Here the comparison is made.
Class & Object
Object
An object is an identifiable object with some properties and behavior. Because an object is simply a real-world object, it is easier to understand the concept of objects when we consider real-life examples around us.
You will be surrounded by a number of objects with certain characteristics and behaviors.
Example:- we can say that 'man' is an object. Its properties are: head, arms, legs etc. Its behavior: running, diving, jumping, writing etc.
Class
A class is a group of objects that share common properties and behavior.
Example:- we can consider a car as a class that has characteristics like steering wheels, seats, brakes, etc. And its behavior is mobility. But we can say Honda City having a reg.number 4654 is an ‘object’ that belongs to the class ‘car’.
In relation to the Properties and Behaviors of an Object, the Object is used as a Class, Properties Variable and Behaviors Methods in Programming. Then Variables and Methods are used in the Class as the Properties and Behaviors of the Object are.
That is, a class is a template created in relation to a certain object. You can implement many objects by changing only the values in the class.
Comments
Post a Comment