[go: up one dir, main page]

0% found this document useful (0 votes)
16 views8 pages

Oops

Uploaded by

Konal Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
16 views8 pages

Oops

Uploaded by

Konal Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 8
Fundamentals of Object-Oriented Programming INTRODUCTION . Change ts: one of the One characte: © software most critical aspects of software development and m ; ew approaches. are end raises a number announced almost every day. The impact of these evelopment engineers, Most import em are maintainability, ty and user friendliness of soi structures that are easy 10 comprehend, implement afd mnedl 4 ina wide variet Since the invention of the computer, many programming approaches have. techniques such as modular programing, rop-down programming, botametp: programming.) The primary motivation in each case has been the cone ( complexity Sf programs that are reliable and maintainable. These technigu programmers over the last two decades. With the advent of languages such as C, structured programming betame paradigm of the 1980s, Structured programming proyed to be « powerful too! that write moderately complex programs fairly easily. However, as the programs grew largery« yach failed to show the desired results in terms of Bug-free, easy-to-maintain, and reusible programs. ic -Oriented Programming (OOP) is an appi program organization and development, which atfempls to eliminate some of the pitfalls of conventional programming methods “noorporating the best of structured programming features with several new coi It is a new way of organizing and iisices However, not all languages are developing programs and has nothing to do with any particular suitable fo implement the OOP concepts easily, Languages that supporsOOP features include Smalltalk, Objective C, C++, Ada and Object Pascal, C++, an exiension of C langus most popular OOP Ianguage today. C++ is basically a procedural language with object-oriented exter oriented language, is one of the recent languages added to this list, the latest one being Ci, ith Java: A Primer 2 I Programminc (2 oBsect-orrenrep PaRapiem ‘The major objective of object-oriented approach is to eliminate some of the flaws encountered in th Procedural approach. OOP trezts dats as a critical clement in the program development and does not it to flow freely around the system. It ties data closely 10 the functions that operate on from unintentional modification by of tus. 10 decompose a problem Entities called Objecrs and then build dota an (known'as methods in Java) around these Sombjpation of data and methods make up an_ot iste Fig. 1.17, The daia of an object can be ad only by the ods associated with that object. However, methods Pe aa Object = Data + Methods object can access the methods of other objects. of the features of object-oriented paradigm are: Emphasis is on data rather than procedur Programs arc divided into what are known a8 Objects Data structures are designed such that they characterize the objects. Methods that operate on the data of an object are ticd together im the data structure. Data is hidden and eannot be accessed by external fisnctions. ‘Objects may communicate with each other through methods. © New data and methods can be easily added whenever necessary. ©. Follows bowom-up approach in program design. Object-oriented paradigm is the most recent concept among programming paradigms and still it means. different things to different people, Its therefore important to have a working definition of object-oriented programming before we proceed further Our definition of object-oriented programming is: Object-oriented programming is an approach that provides a way of modularizing programs by creating operations that eam access the data. Since the memory partitions are independent, the objects: a variety of different programs without modifications. | pote J BASIC CONCEPTS OF OBJECT-O) PROGRAMMING AS mentioned earlier, object-oriented is a term. which is i — therefore necessary to understand Through inheritance, we ean elinvinate redundant code and extend the use of existing classes. _s-We can buildprograms from the standard working modules that communicate with one another, rather than having to start writing the code from scratch. This leads to saving of development time and higher produetivit The principle of data hiding helps the programmer to build secure programs that cannot be invaded by code in other parts of the program. Itis possible to have multiple objects to coexist without any interference. tis possible to map objects in the problem domain to those objects in the program. Its easy to partition the work in a project based on objects. The dala-centered design approach enables us fo capture more details ofa model in an implementable form, Object-oriented systems ean be easily upgraded from small to large systems. ‘Message passing techniques for communication between objects make the interface descriptions with external systems much simpler. Software complexity can be easily managed. 4 pr While it is possible to incorporate all these features in an object-oriented system, their importance depends on the type of the project and the preference of the programmer, There are a number of i need to be tackled to reap some of the benefits stated above, For instance, class libraries mast Torreuse, The technology is still developing and current products may be superseded quickly, and protocols need to be developed if reuse 1s not to be compromised, a : Programming sctth Jawa: 4 Pre A software that is easy to use is bard’ to Pail Jhis hoped thar the object-oricaned programnesins SNES like C++ and Java would help manage ths probic=. APPLICATIONS OF OOP cre apes to be a pest deol of cucbemeet Sot 7 TOOP eb gt geen porters the area neopterin, up 10 S0%, bes boca sccms developed using OOP more objects with complicated simplify a complex exeaplex and ccorsin may a applications becasse # cae (CIMCADCAD system nis believed that the richness of OOP environmest will enable the sottware industry to improve not only the quality of software sysicms bat also its productivity. Object orieated technology is ccraimly changing tie vay software engineers think analyze, design and implement systems todsy. Javais g object crit language It exibles us not only to organize our program code into losical wits Called objecs but also 10 lke advantage of cocapsolation, inberaance, ane polymnorphism. In ths chaptes swe have introduced the basic concepts of object-onieated programming which incinde + Encapsulation, + Inhetsce, and ‘= Pobymorphises We also discussed briefly the benefits and applications of object-oriented programming approach.

You might also like