Friday, August 21, 2020

Introduction to Object Oriented Programming Essay Example

Prologue to Object Oriented Programming Essay PC Programming 2 Programming Paradigm Procedural Programming ? ? style of programming in which the programming task is separated into a progression of activities (called strategies) applied to information (or information structures) C and Pascal Object-Oriented Programming ? ? ? expansion of procedural programming separates a programming task into a progression of communications among various substances or articles Java, C++, and Smalltalk Introduction to OOP * Property of STI Page 1 of 15 Computer Programming 2 Object-Oriented Programming sort of programming in which software engineers characterize the information structures, yet additionally the ypes of activities (strategies) that can be applied to the information structure empowers developers to make modules that don't should be changed when another kind of item is included most broadly utilized worldview as opposed to concentrating on what the framework needs to do, center around: ? what protests the framework contains ? how the y cooperate towards taking care of the programming issue Introduction to OOP * Property of STI Page 2 of 15 1 _________________ ___________________ _________________ ___________________ Computer Programming 2 Object-Oriented Programming Illustration of OOP Introduction to OOP * Property of STI Page 3 of 15 Computer Programming 2 Object-Oriented Programming Advantages of OOP over ordinary methodologies: ? It gives a reasonable measured structure to programs which makes it useful for characterizing theoretical information types where usage subtleties are covered up and the unit has a plainly efined interface. ? It makes it simple to keep up and change existing code as new articles can be made with little contrasts from existing ones. ? It gives a decent system to code libraries where provided programming parts can be effectively adjusted and altered by the software engineer. This is especially valuable for creating graphical UIs. Prologue to OOP * Property of STI Page 4 of 15 3 ______ ____________ ___________________ __________________ 4 __________________ ___________________ Computer Programming 2 Object-Oriented Programming Key OOP ideas: ? Items ? Classes ? Reflection ? Legacy ? Exemplification ? Polymorphism Introduction to OOP * Property of STI Page 5 of 15 Computer Programming 2 Objects and Classes Objects ? ? speak to â€Å"things† from this present reality made up of †¢ traits †qualities that characterize an article techniques †independent square of program code like strategy ? model: †¢ a car’s qualities are make, model, year, and price tag †¢ a car’s strategies are forward and in reverse Classes ? ? ? ? term that portrays a gathering or assortment of items with normal properties characterize a sort of article indicates strategies and information that kind of article has model: †¢ Employee †¢ Car Introduction to OOP * Property of STI Page 6 of 15 5 _________________ ___________________ _____________ _____ 6 _________________ ___________________ Computer Programming 2 Abstraction permits a software engineer to shroud everything except the significant data (to the current issue) about an article so as to lessen multifaceted nature and increment proficiency firmly identified with exemplification and data concealing Introduction to OOP * Property of STI Page 7 of 15 Computer Programming 2 Encapsulation alludes to the stowing away of information (traits) and ethods inside an item shields an object’s information from debasement shields the object’s information from subjective and unintended use conceals the subtleties of an object’s interior execution from the clients of an item isolates how an item acts from how it is actualized simpler to alter programs since each item type is adjusted in turn Introduction to OOP * Property of STI Page 8 of 15 7 __________________ ___________________ __________________ ___________________ Computer Programming 2 Encapsulation Il lustration of Encapsulation Change Address Change Name View Name Enroll in a Course Name Address Course GPA Drop a Course View GPA Introduction to OOP * Property of STI Page 9 of 15 Computer Programming 2 Inheritance the procedure by which items can procure (acquire) the properties of objects of different class gives reusability, such as adding extra eatures to a current class without altering it Introduction to OOP * Property of STI Page 10 of 15 9 _________________ ___________________ 10 ________________ ___________________ Computer Programming 2 Inheritance getName() etID() Name Student ID setName() setID() Student Introduction to OOP * Property of STI Page 11 of 15 Computer Programming 2 Polymorphism alludes to the capacity to process questions distinctively relying upon their information type or class the capacity to reclassify techniques for inferred classes demand for an activity can be made without knowing which explicit strategy ought to be summoned Introduction to OOP * Pr operty of STI Page 12 of 15 11 _________________ ___________________ __________________ ___________________ 12 _________________ ___________________ Computer Programming 2 Polymorphism Illustration of Polymorphism Student Application Form s. isRegistered() Car c. isRegistered() Introduction to OOP * Property of STI Page 13 of 15 Computer Programming 2 Abstract Classes class that isn't utilized to make (launch) objects intended to go about as a base class (to be acquired by different classes) esign idea in program improvement and gives a base whereupon different classes are fabricated can just indicate individuals that ought to be executed by every acquiring class Introduction to OOP * Property of STI Page 14 of 15 13 ________________ ___________________ 14 ________________ ___________________ __________________ ___________________ Computer Programming 2 Interfaces permit you to make definitions for segment cooperation give another method of actualizing polymorphism determine techniq ues that a segment must execute without really indicating how the strategy is actualized Introduction to OOP * Property of STI Page 15 of 15 _________________ ___________________

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.