103k views
0 votes
Which of the following is a major benefit of object-oriented programming?

A) The development of logical steps to achieve the object of the program
B) The use of subroutines that optimize the program's objective
C) The creation of objects that can be used or modified for use in future applications
D) The freedom for programmers to create objects unique to each program
E) The defining of objects as static entities that do not relate to each other

User Czerasz
by
7.0k points

1 Answer

4 votes

Final answer:

A major benefit of object-oriented programming is the creation of objects that can be used or modified for use in future applications. This allows for code reuse, making the development process more organized, efficient, and scalable.

The Correct option is; C) The creation of objects that can be used or modified for use in future applications.

Step-by-step explanation:

A major benefit of object-oriented programming is the creation of objects that can be used or modified for use in future applications. In object-oriented programming, objects are the building blocks of a program. These objects contain both data and behavior, and can be reused in different parts of the program without rewriting the code.

For example, let's say you're building a program to simulate a zoo. You can create an object called 'Animal' with attributes such as name, age, and species, and methods such as 'eat' and 'sleep'.

This 'Animal' object can be used to create specific animals like 'Lion' or 'Elephant', and these objects can inherit the attributes and methods from the 'Animal' object. If you need to add new functionality or modify existing behavior, you can do so without affecting the other parts of the program that use the 'Animal' object.

Therefore, object-oriented programming allows for the creation of objects that can be used or modified for use in future applications, making the development process more organized, efficient, and scalable.

User Anka
by
8.1k points