Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Create a presentation which explains the key features of an object oriented program.
Transcript of Create a presentation which explains the key features of an object oriented program.
For example, you are coding a zombie walk and lets say that in the future you are asked to add another zombie, you can just reuse the code that you used for the other zombie and this will make the work easier and it will save you lots of time. Reusable units of programming logic Object identification is a term used to identify a certain object. For example if in your program you have a gun and a chicken they will be identified in two different ways and they will have certain things that will make them different. Even if you add to your program two chicken of the same type they will be identified in two different way. They will have different names and everything that you code for your first chicken wont be coded for your second chicken. Identification of objects Classifying an object means identifying that object which must belong to a class, you have to look at the way in which the classification is done which is really important. There are only three general approaches to classification.
1 Classical categorization
2 Conceptual clustering
3 Prototype theory
Classifying your object will make it easier for you in the future to find it. Classification of objects Modularity allows you to split your object in different parts. Splitting your object will allow you to control different parts of your object on their own without moving the entire object. This will make your work easier and faster and it will make it even more professional. Changing sub parts on their own is a big thing that helps the user a lot. Modularity In object-oriented programming, a method is a subroutine (or procedure) associated with a class. What a method does is basically controlling the object. Using methods in Alice will allow you to control your object in many ways which will make your work really easy and fast. There are many methods which you can use, and of course each of them does something different. Methods A function in Alice is basically a question about information in your Alice world that Alice answers. Click on functions, each of these functions asks a question about the object you are working on and then it will remember the answer so that you can use it in your Alice world. These functions can be useful in Alice. For example you need to move your object up and place it on the top of another object, you dont know how tall that object is but Alice does. Functions In a programming language, encapsulation is used to refer to one of two related but distinct notions, and sometimes to the combination thereof:
A language mechanism for restricting access to some of the object's components.
A language construct that facilitates the bundling of data with the methods operating on that data.
Some programming language researchers and academics use the first meaning alone or in combination with the second as a distinguishing feature of object oriented programming, while other programming languages which provide lexical closures view encapsulation as a feature of the language orthogonal to object orientation.
The second definition is motivated by the fact that in many OOP languages hiding of components is not automatic or can be overridden; thus, information hiding is defined as a separate notion by those who prefer the second definition.
Encapsulation is nothing but protecting anything which is prone to change. rational behind encapsulation is that if any functionality which is well encapsulated in code i.e maintained in just one place and not scattered around code is easy to change. this can be better explained with a simple example of encapsulation in Java. we all know that constructor is used to create object in Java and constructor can accept argument. Suppose we have a class Loan has a constructor and than in various classes you have created instance of loan by using this constructor. now requirements change and you need to include age of borrower as well while taking loan. Since this code is not well encapsulated i.e. not confined in one place you need to change everywhere you are calling this constructor i.e. for one change you need to modify several file instead of just one file which is more error prone and tedious Encapsulation The word Polymorphism means of many forms.In programming this word is meant to reuse the single code multiple times.
Its obvious that when we do inheritance between two classes, all the methods and properties of the first class are derived to the other class so that this becomes the child class which adobes all the functionality of base class.It can also possesses its own separate methods.
But there is a big problem in inheriting the second class to the first class as it adobes all the methods same as the base class has,which means that after inheritance both(base class& child class) have the methods of same name and same body.
Polymorphism is used to remove the problem which is shown in the above code.It is done not by changing the name of the methods of both base & derived class.Infect it is done by adding the "virtual" keyword before the base class method, and the "override" keyword before the derived class method. Polymorphism Inheritance is specific to object-oriented programming, where a new class is created from an existing class. Inheritance (often referred to as subclasses) comes from the fact that the subclass (the newly created class) contains the attributes and methods of the parent class. The main advantage of inheritance is the ability to define new attributes and new methods for the subclass which are then applied to the inherited attributes and methods.
This can be used to create a highly specialized hierarchical class structure. The biggest advantage is that there is no need to start from scratch when wanting to specialize an existing class. As a result, class libraries can be purchased, providing a base that can then be specialized at will (the company selling these classes tends to protect member data using encapsulation). Inheritance How suitable object oriented programming is for graphical applications The continued improvement and proliferation of graphics hardware for workstations and personal computers has brought increasing prominence to a newer style of software application program. This style relies on fast, high quality graphics displays coupled with expressive input devices to achieve real-time animation and direct-manipulation interaction metaphors. Such applications impose a rather different conceptual approach, on both the user and the programmer, than more traditional software. The application program can be thought of increasingly as a virtual machine, with a tangible two- or three- dimensional appearance, behavior and tactile response
Dynamic graphics techniques are now considered essential for making computers easier to
use, and interactive and graphical interfaces that allow the presentation and the direct manipulation of information in a pictorial form is now an important part of most of modern graphics software tools. The range of applications that benefit from this techniques is wide: from two-dimensional user interfaces popularized by desktop computers like Apple's Macintosh or the NeXT computer, to CAD and animation systems that allow the creation, manipulation and animation of complex three-dimensional models for purposes of scientific visualization or commercial animation. Unfortunately, the creation and the implementation of such dynamic applications are a complex tasks: these systems have to manage an operational model of the real or virtual world, and simulate the evolution of this model in response to events that can occur in an order which is not predefined. They must handle multi-threaded dialogues with the user that2 are essential for direct manipulation interfaces, and make extensive use of many asynchronous input devices, ranging from the common keyboard and mouse to sophisticated 3D devices
such as the Spaceball, Polhemus or DataGlove. As dynamic graphics applications become larger, more sophisticated, and move increasingly into the 3D realm, their software engineering problems have become acute. It is increasingly evident that software design must make more use of assemblies containing standard components that can be reused and extended from project to project. In order to build any dynamic graphics application, from a simple two-dimensional userinterface manager to a complex three-dimensional animation system, three major problems
have to be solved.
• How to describe and manage the model that the application is supposed to manipulate?
• How to render this model?
• How to obtain animation and interactive control?
A good solution to these questions should result in a system that is highly efficient, reusable and extensible. The object-oriented paradigm suggests that all relevant information should be encapsulated within objects. This leads to a major conceptual shift in design from a functional decomposition approach, in which the basic unit of modularization is the algorithm, to a data decomposition approach, in which the basic unit of modularization is the data structure. Since interactive and dynamic graphics must respond to real-time input events as they happen, it is usually impossible to know when and in what order the events will come.
Therefore, at any moment during the execution of a dynamic application the entire state has
to be explicitly maintained in a global data structure. Most modern object-oriented graphics systems obtain their real-time input in the form of
events in an event queue. Event queues are generally the preferred method, although some systems, such as the original Smalltalk, use polling and others, such as X windows, allow a mixture of the two. The challenge of building dynamic graphics applications that realize the full potential of modern computer graphics hardware remains immense. Object-oriented design techniques,
however, provide a significant advance toward the creation of reusable and extensible software components and assemblies for dynamic graphics construction. As object-oriented techniques
become more accepted and as language and implementation issues are resolved, more attention can be focussed on the larger design issues. These principles can themselves form the basis for
increasingly automated interactive software construction tools for building the next generation of dynamic graphics applications. http://www.google.co.uk/imgres?num=10&hl=en&biw=1280&bih=898&tbm=isch&tbnid=x_6SIpwvxO8MHM:&imgrefurl=http://objectorientedcoldfusion.org/procedural-vs-object-oriented.html&docid=46uHr6gv5TcoHM&imgurl=http://objectorientedcoldfusion.org/assets/images/object-private-variables.gif&w=355&h=259&ei=yViGUIP4NZCKhQfKvIDIDw&zoom=1&iact=rc&dur=278&sig=108688418808142237005&page=1&tbnh=136&tbnw=217&start=0&ndsp=26&ved=1t:429,r:12,s:0,i:145&tx=121&ty=43 http://www.google.co.uk/imgres?num=10&hl=en&biw=1280&bih=898&tbm=isch&tbnid=zcUgThoqJ33R3M:&imgrefurl=http://www.kilowattsoftware.com/tutorial/rooPresentation/ooFundamentals.htm&docid=PmcbVKmBosAvcM&imgurl=http://www.kilowattsoftware.com/tutorial/rooPresentation/topDown.gif&w=327&h=219&ei=yViGUIP4NZCKhQfKvIDIDw&zoom=1&iact=rc&dur=198&sig=108688418808142237005&page=1&tbnh=136&tbnw=203&start=0&ndsp=26&ved=1t:429,r:11,s:0,i:142&tx=114&ty=95 http://www.google.co.uk/imgres?hl=en&biw=1280&bih=898&tbm=isch&tbnid=AQwvEIpRvgsbRM:&imgrefurl=http://www.vrarchitect.net/anu/cg/Java2DIntro/printNotes.en.html&docid=a85EOOm7-t49kM&imgurl=http://www.vrarchitect.net/anu/cg/Java2DIntro/Image/oopDiag.gif&w=502&h=332&ei=OFqGUIj9DMeFhQe_jYCoDw&zoom=1&iact=rc&dur=153&sig=108688418808142237005&page=2&tbnh=151&tbnw=229&start=25&ndsp=32&ved=1t:429,r:6,s:20,i:148&tx=134&ty=53 http://www.google.co.uk/imgres?hl=en&biw=1280&bih=898&tbm=isch&tbnid=h0THoB-H4Vi_OM:&imgrefurl=http://en.wikibooks.org/wiki/A-level_Computing/AQA/Problem_Solving,_Programming,_Operating_Systems,_Databases_and_Networking/Programming_Concepts/Object-oriented_programming_(OOP)&docid=463mq0-N7ZemHM&imgurl=http://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/CPT-OOP-inheritance-bikes.svg/387px-CPT-OOP-inheritance-bikes.svg.png&w=387&h=273&ei=aFqGUI2jINGzhAf_z4GQBQ&zoom=1&iact=hc&vpx=411&vpy=301&dur=254&hovh=188&hovw=267&tx=170&ty=93&sig=108688418808142237005&page=1&tbnh=148&tbnw=210&start=0&ndsp=25&ved=1t:429,r:6,s:0,i:84