What is the need of classes for OOPS programming language?
Asked by Amitoj Singh Baweja
-
2 Answers
-
Object-Oriented Programming has the following reasons to be used:
1) OOP provides a clear modular structure for programs.
2) OOP makes it easy to maintain and modify existing code.
3) OOP provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer.
4) Code reusability.
5) It is suitable for real word problems and real world works.
Few more points for better understanding are:
Why? Because if you stick to the rules, it makes complex code easier to develop, reliable, maintainable, and generally better.
OOP insists that you think about what you expose to the outside wor...more -
Following two concepts explain everything about the use of OOPs.
1. Duplicate code is bad.
2. Code will always be changed.
So, above statement proves, OOPs is provides code reusability which reduces the duplication of code because once you have duplicate code, you have made changes everywhere which leads to performance. The code can be changed anytime or requirement of application changed anytime so when you want to make changes in your application, OOPs makes it easier.
Features of OOPs.
There are three main features of OOPS.
1. Abstraction: Learn abstraction here (PHP 5 Abstract classes and Methods)
2. Polymorphism: It is a feature that all...more
Related Questions
Taking an Exam? Selecting a College?
Get authentic answers from experts, students and alumni that you won't find anywhere else
Sign Up on ShikshaOn Shiksha, get access to
- 64k Colleges
- 966 Exams
- 618k Reviews
- 1450k Answers