About site: Programming/Methodologies/Object-Oriented/Criticism - OO Example Code
Return to Computers also Computers
  About site: http://onestepback.org/articles/poly/

Title: Programming/Methodologies/Object-Oriented/Criticism - OO Example Code Example using object-oriented polymorphism in object-oriented and non object-oriented programming languages.
The_Graphics_Ring Collected works of many graphics oriented sites on the net. Holiday graphics section, a newsletter, online postcards, contests, tips and tricks, fonts and other information. Find everything needed to

Primary_Collection 22 tried and tested programs. Designed mainly to develop basic reading and mathematical skills. From Porters Primary Software.

Trion_Development_Portal Goal: create modern 32/64-bit OS, based on ideas of object-orientation, nanokernel; coded in C++, C and Assembly where needed. Open source, BSD.

RFC_0490 Surrogate RJS for UCLA-CCN. J.R. Pickens. March 1973.

Napster_suit_tests_new_copyright_law A new copyright law designed to protect the works of songwriters, is being tested in a case that pits the powerful recording industry against a wildly popular but controversial music start-up Napster.

Excite_Designs,_Inc_ Professional Web site, graphics, multimedia design and Internet marketing services. Details on services and pricing.


  Alexa statistic for http://onestepback.org/articles/poly/





Get your Google PageRank






Please visit: http://onestepback.org/articles/poly/


  Related sites for http://onestepback.org/articles/poly/
    How_To_Post_Absolutely_Anonymously? An article with some comments about anonymity and privacy.
    Caspio_Inc_ On-demand service for creating feature-rich web forms and applications fast and without programming and deploy them instantly on any web site.
    iPodLinks Collection of iPod links and resources.
    QubitNews Portal with news for quantum information community, including recent events and available positions.
    Analyzing_Steganogaphy_Software Review of 12 steganography products, both freeware and commercial. Covers strength and detectability of algorithms used.
    Motion_Modeling Eclipse plugin for MDA and UML 1.4. Development Status: Alpha [Open source, GPL]
    RFC_1397 Default Route Advertisement In BGP2 and BGP3 Version of The Border Gateway Protocol. D. Haskin. January 1993.
    Getting_Intimate_With_PHP\'s_Mail()_Function PHP's Mail() function is a great way to send mail using a simple and standard interface that hides the complexity and quirks of various system programs that are responsible for sending mail. This tuto
    CBL_Able Extensive information about CBL use for teachers, including sample experiments, technical support, and science education standard information.
    JavaCertificate A free online training centre that will help prepare for the Sun Certified Programmer for Java(tm) 2 Platform exam (SCJP 1.4).
    Lawson-Jobs_com Employment site for permanent and contract work. Employers can post free openings. Provides job listings for candidates.
    JGrinder Initially began as a solution for Object/Relational persistence. Supporting this involved the creation of many utility classes and tools that could be used to accelerate any application development ef
    ZDNet__Exec_quits__Is_Mozilla\'s_future_in_doubt? Jamie Zawinski left mozilla.org (April 2, 1999)
    easyLaTeX Software which calls all tools necessary to create PDF, DVI or HTML output out of simple text files (via LaTeX) using LaTeX like syntax. Download and documentation.
    World_Centre,_Inc_ Offers web hosting, maintenance, networking, and analysis.
    Advertising_and_Design Professional web site design and development, marketing programs and advertising. Located in Billings, Montana.
    Captbob\'s_Computer__Services Website design, hosting, e-commerce storefronts, shopping cart solutions, and local area computer networks.
    6th_FUZZY_DAYS 6th Fuzzy Days, May 25 - 27, 1999, Dortmund, Germany (May 25, 1999)
    HP_to_Protect_Customers_from_Linux_Claims Hewlett-Packard joins fray over whether Linux contains unlawful Unix code. Martin Fink, an HP vice president, said HP would indemnify its customers against any legal liability from using Linux. [eWeek
    Araxis_Merge_for_Windows Visually compare and merge files and folders.
This is websites2007.org cache of m/ as retrieved on 2008.10.11 websites2007.org's cache is the snapshot that we took of the page as we crawled the web. The page may have changed since that time.
OO Example in C and C++

OO Example Code

The Setup ...

An email converversion on the CLUGmailing list got on the topic of doing Object Oriented program (withruntime polymorphism) in a non-OO language like C. What would ittake, what would the code look like and is it worth it?

The Problem ...

Here is a small example of a OO program that uses the followingclasses: |<<inteface>>| | Shape | A | +--------+-------+ | | |Rectangle| |Circle|Shape provides an abstract interface that supportsDraw(), MoveTo(x,y), and RMoveTo(dx,dy)methods. Rectangle and Circle support that interface aswell as defining their own specific methods(e.g. SetRadius(newRadius) for Circle).Note:My intention was to have the Shape class be a pure interface, withall implementation in the derived classes. A few of the examples movethe MoveTo and RMoveTo methods implementations into the Shape class.This certainly reduces redundency and is an acceptable optimizationfor this example.

The Challenge ...

I initially produced the C and C++ versions of the program. Someoneon the CLUG list offered a Perl version. So I thought that it wouldbe interesting to see this small problem written in several differentOO languages (or non-OO languages with manual polymorphism). Anyonecan submit a version, just send it to me, Jim Weirich, at jim@weirichhouse.org.

The Results ...

OO LanguagesLanguages in this table provide some sort of support for theObject Oriented programming.LanguageOutputContributed ByBeta Output Chris RathmanC++ Output Jim WeirichCecil Output Scott AndersonCLOS Output Chris RathmanComponent Pascal Output Chris RathmanDelphi Output Chris RathmanDylan Output Scott AndersonEiffel Output Jim WeirichItcl Output Chris RathmanJava Output Jim WeirichJavaScript Output Chris RathmanLPC Output Scott AndersonModula3 Output Chris RathmanOberon Output Chris RathmanObjective-C Output Chris RathmanOcaml Output Chris RathmanPerl Output Bradley KuhnPhp Output Chris RathmanPython Output Monty SteinRuby (original) Ruby2 (improved version) Output Chris Rathman Guy N. HurstSather Output Chris RathmanSimula N/A Chris RathmanSmalltalk Output Chris RathmanVisual Basic Output Chris RathmanVBScript Output Chris RathmanVisual Foxpro Output Chris RathmanGeneral Purpose non-OO LanguagesLanguages in this category are general purpose languages that don'tprovide any features for Object Oriented programming.LanguageOutputContributed ByANSI C Output Jim WeirichErlang Output Chris RathmanForth Output Jim WeirichHaskell Output Chris RathmanIcon Output Chris RathmanModula2 Output Chris RathmanSpecial Purpose LanguagesLanguages in this category are special purpose languages. Thisincludes things like scripting languages and data base languages. Theentries in this category really stretch the envelope to beable to do polymorphism.LanguageOutputContributed ByAdvSys Output Scott Andersonawk Output Scott AndersonDOS Batch Output Scott AndersonFoxpro Output Scott AndersonPostscript Output Scott AndersonProlog Output Chris Rathmansed Output Scott AndersonShell Script Output Monty SteinAlmost, but not quite ...Bryce Jacobs offers a XBaseversion. Unfortunately, Bryce's version only offers a limitedform of polymorphism (where the base class must enumerate allsubclasses). Bryce also offers some general criticism of the OOparadigm which you might enjoy.Jim Weirich / jim@weirichhouse.org
 

Example

using

object-oriented

polymorphism

in

object-oriented

and

non

object-oriented

programming

languages.

http://onestepback.org/articles/poly/

OO Example Code 2008 October

dvd rental

dvd


Example using object-oriented polymorphism in object-oriented and non object-oriented programming languages.

Rules




© 2008 Internet Explorer 5+ or Netscape 6+

Recommended Sites: 1. Arts - Business - Computers - Games - Health - Home - Kids and Teens - News - Recreation - Reference - Regional - Science - Shopping - Society - Sports - World Miss Gallery - Top Anime Hentai - DVD rental by mail - Electricity - Pink Ranger - Samsung - Premade MySpace Layouts - Mobile Phones
2008-10-11 16:41:51

Copyright 2005, 2006 by Webmaster
Websites is cool :) 216Metallica - List Motywacyjny - Zwoltex - Cv, List Motywacyjny - Kolczyki