Sie sind auf Seite 1von 2

A Quick Introduction to Object-Oriented

Programming

This segment is for those of you who have not yet been presented to protest situated programming.
Be that as it may, proviso emptor. We can't, in a couple of pages, do equity to all the imaginative
new thoughts related with OOP. Our objective is only to make it feasible for you to

comprehend the example programs in the content of this book. What we state here won't change
you into an article situated C++ software engineer, yet it should make it feasible for you

to follow the example programs. (On the off chance that you know OOP, you can most likely avoid
this area.)

In the event that, in the wake of perusing this segment and looking at a portion of the example code
in the accompanying

hours, you despite everything locate the entire OOP business as outsider as quantum material
science, you may

need an increasingly intensive introduction to OOP. See the perusing list in Appendix C, "Further

Perusing," for recommendations.

Issues with Procedural Languages

OOP was developed in light of the fact that procedural dialects, similar to C, Pascal, and BASIC, were
found

to be insufficient for enormous and complex projects. For what reason was this? The issues need to

do with the general association of the program. Procedural projects are sorted out by

partitioning the code into capacities (called systems or subroutines in certain dialects).
Gatherings of capacities could shape bigger units called modules or records.

Unrefined Organizational Units

One trouble with this sort of capacity based association was that it centered around capacities to the
detriment of information. There weren't numerous choices when it came to information. To
disentangle somewhat, information could be nearby to a specific capacity, or it could be

worldwide—open to all capacities. There was no chance to get (in any event not an adaptable
method) to

determine that a few capacities could get to an information thing and others proved unable.

This caused issues when a few capacities expected to get to similar information. To be

accessible to more than one capacity, such factors must be worldwide, yet worldwide information

could be gotten to unintentionally by any capacity in the program. This prompted visit programming
blunders. What was required was an approach to tweak information openness, permitting

factors to be accessible to capacities with a need to get to the information, yet concealing it from
others.

Poor Modeling of the Real World

It is additionally difficult to conceptualize a true issue utilizing procedural dialects.

Capacities complete an undertaking, and information stores data, however most true articles do

both these things.

Das könnte Ihnen auch gefallen