|
1-20 (of 3012) related articles
Items per page
| |
|
A Learning Research Informed Design and Evaluation of a Web-enhanced Object...
HEADNOTE ABSTRACT "Object-Oriented Programming" subject is included in the ACM Curriculum Guidelines for Undergraduate and Graduate Degree Programs ... (PERIODICAL ARTICLE)
Translating the Meaning of Object-Oriented Programming
Java is object-oriented. Unlike languages such as FORTRAN, which focus on giving the computer imperative "Do this/Do that" ... (BOOK EXCERPT ARTICLE)
Teaching Object-Oriented Programming Concepts Using Visual Basic .NET
1. INTRODUCTION ... (PERIODICAL ARTICLE)
Next wave 'component' programming ... Armed
with a grant from the UK...
Armed with a grant from the UK government, Intelligent Environments Inc. is building client/server application-development software that it ... (PERIODICAL ARTICLE)
Object-Oriented Programming: A Primer
The seeds of object-oriented programming might be traced back to the concept of the API (application programming interface). (PERIODICAL ARTICLE)
DRIVE: A tool for developing, deploying, and managing distributed sensor...
HEADNOTE This paper introduces Distributed Responsive Infrastructure-Virtualization Environment (DRIVE), a tool that provides both an integrated development environment ... (PERIODICAL ARTICLE)
Menlo Park, Calif.-based Lucid Inc. has just announced
its Energize...
Menlo park, Calif.-based Lucid Inc. has just announced its Energize Programming System, "the first product designed to provide ... (PERIODICAL ARTICLE)
Digitalk Inc., developer of the Smalltalk/V line of
object-oriented...
Digitalk Inc., developer of the Smalltalk/V line of object-oriented programming systems, is developing a 32-bit version of its ... (PERIODICAL ARTICLE)
Tolerance representation scheme for a
three-dimensional product in an...
1. Introduction The need for an efficient tolerance representation scheme in current CAD/CAM systems and solid modelers has ... (PERIODICAL ARTICLE)
Object-Oriented Computation in C++ and
Java.
Object-Oriented Computation in C++ and Java Conrad Weisert Dorset House Publishing Company 353 12th Street, New York, ... (PERIODICAL ARTICLE)
Effects of a Case-Based Reasoning System on Student Performance in a Java...
HEADNOTE ABSTRACT The purpose of this study was to determine if a case-based reasoning tool would improve a ... (PERIODICAL ARTICLE)
Computers-for-edu: An Advanced Business Application Programming (ABAP)...
HEADNOTE ABSTRACT The Computers-for-edu case is designed to provide students with hands-on exposure to creating Advanced Business Application ... (PERIODICAL ARTICLE)
Integrated programming software
RSLogix v16 programming software allows GuardLogix users to control multiple axis robot applications. It features user-defined add-on instructions; ... (PERIODICAL ARTICLE)
Integrated programming software
RSLogix v16 programming software allows GuardLogix users to control multiple axis robot applications. It features user-defined add-on instructions; ... (PERIODICAL ARTICLE)
Machine Beauty
A serious discussion about the beautiful machine began in earnest about 10 years ago with David Gelernter's small ... (PERIODICAL ARTICLE)
Depicting flow.
Capability: The updated Tecplot 360 2008 graphically simulates computational fluid dynamics and numerical simulation problems. One new feature, ... (PERIODICAL ARTICLE)
Machine Beauty.
A serious discussion about the beautiful machine began in earnest about 10 years ago with David Gelernter's small ... (PERIODICAL ARTICLE)
AN IMPROVED SUITE OF OBJECT ORIENTED SOFTWARE MEASURES
HEADNOTE ABSTRACT In the pursuit of ever increasing productivity, the need to be able to measure specific aspects ... (PERIODICAL ARTICLE)
Avoiding Common Java Mistakes
Some wise soul once said, "The only people who never make mistakes are the people who never do ... (BOOK EXCERPT ARTICLE)
Alfresco tries to repeat history
Fifteen years ago, John Newton co-founded Documentum (docu mentum.com) on the premise that a document management system was ... (PERIODICAL ARTICLE) | |
|
1-20 (of 3012) related articles
Items per page
1-20 (of 3012) related articles
|
a programming methodology in which the programmer can define not only data types, but also methods that are automatically associated with them.Ageneral type of an object is called a class. Once a class has been defined, specific instances of that class can be created.
The same name can be given to different procedures that do corresponding things to different types; this is called polymorphism. For example, there could be a "draw" procedure for circles and another for rectangles.
Some uses for object-oriented programming include the following:
Here is an example of object-oriented programming in Java. Imagine a program that manipulates points, lines, and circles. A point consists of a location plus a procedure to display it (just draw a dot). So the programmer defines a class called pointtype as follows:
The class pointtype is defined to include two integer variables (x and y) and one method (draw). (The class also would include a
Now variables of type pointtype can be declared, for example:
Here the objects a and b each contain an x and a y field; x and y are called instance variables. In addition, a and b are associated with the draw procedure. Here's an example of how to use them:
This sets the x and y fields of a to 100 and 150, respectively, and then calls the draw procedure that is associated with a (namely pointtype.draw). (The g stands for graphics.)
Now let's handle circles. A circle is like a point except that in addition to x and y, it has a diameter. Also, its draw method is different. We can define circletype as another type that includes a pointtype, and it adds an instance variable called diameter and substitutes a different draw method. Here's how it's done:

Your program would create a new object of class circletype (call it c), define values for the variables, and then call the method circletype.draw to display the circle on the screen. See the book's web page, www.termbook.com, for an example.
It is important to remember that instance variables belong to individual objects such as a, b, and c, but methods (procedures) belong to object types (classes). One advantage of object-oriented programming is that it automatically associates the right procedures with each object: c.draw uses the circle draw procedure because object c is a circle, but a.draw uses the point draw procedure because object a is a point.
The act of calling one of an object's methods is sometimes described as "sending a message" to the object (e.g., c.draw "sends a message" to c saying "drawyourself").All object-oriented programming systems allow one class to inherit from another, so the properties of one class can automatically be used by another class. For example, there is a standard Java class called Applet which contains the code needed to display an applet on the web. When you write your own applet, it will inherit from (extend) this class, so you don't need to recreate that code yourself.