Home > DeveloperSection > Beginner > OOPS????

OOPS????


Java OOPS 
Ratings:
2 Comment(s)
 1693  View(s)
Rate this:
In my last post, i explained about role of object in oops language. Now, we more elaborate it with some e.g.
I explain it through a e.g. of car.
In car, we have field: its mph and rpm. we have methods: gear, speed,cadence, music system volume.
class Bicycle
gear, speed, cadence , music system volume. 
{
int cadence= 0;
int speed=0;
int music system volume=0;
int gear=1;
void changeCadence(int newValue)
{
Cadence=newValue;
}
void speedUp(int increment)
{
speed=speed+increment;
}
void changeGear(int newValue)
{
gear=newValue;
}
void musicvolumeHigh{ int increment)
{
music volume= music volume+ increment;
}
void printStates()
{
system.out.println("cadence:"+cadence+"speed:"'+speed+"gear:"+gear+"music volume:"+music volume);
}


features in oops.

By ANkita gupta on   2 years ago
In oops programming their are mainly few features which are responsible to make the programming stylish and effective.these are as follows:
1.Data Encapsulation: Hiding internal data from outside world & accessing it only through publicly exposed methods.
2.Polymorphism: It is used when we make different forms , but with  same name.
3.Inheritance: It is used to make different classes from other super classes.It is used for extensible and reusable purpose. 
4.Modularity: It is closely tied with encapsulation i.e. it sis used for the purpose of mapping.
5.Abstraction: relevant features necessary.
6.Access Modifier: public, private, default and protected.
7. Non-Access Modifier: sealed, enumerator.

Very Nice post

By ben reitman on   2 years ago
Again  you have explained very conceptually. Very Good Ankita!!

You may refer theses post to get more in OOPS :


Here is more for Java Enthusiasts :
http://www.mindstick.com/Category/article/java#.VT9IhCGqqko 
http://www.mindstick.com/Category/blog/java#.VT9LDSGqqko


Don't want to miss updates? Please click the below button!

Follow MindStick