Question: oops how to do in java?
Answer: Abstraction. Abstraction means using simple things to represent complexity. ... 
Encapsulation. This is the practice of keeping fields within a class private, then providing access to them via public methods. ... 
Inheritance. ... 
Polymorphism.