Joop0407.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

Joop0407.Pdf November/December 1991 Vol. 4, No, 7 Editorial 6 Features Guest Editorial 8 Boti Magnmson 10 Contravariance for the rest of us byWarren Hati c++ 40 Gntravtimce is a phenomenonthat occurs as an interactionbetweensubtypingartdhigher- Understanding constructor initializers order fincriona. II affecu allobject-orientedprogramminglanguagesincludingC++ and is usually in C++ circumven~cdby overlodlng. The author providesmamplesin C++ whereoverloadingdoa not Andrm Koenig havethe desiredeffect,and discusseswhat a be,ter — more expressiveand ~esafe — language might look like. Modeling & Design 48 The evolution of bugs and systems Jamer Rumbaugh 19 Multilevel secure object-oriented data model — issues on noncomposite objects, composite Tools 53 Making inferences about objects objects, and versioning Pard Harmon by Bhavani Thurukingham ~Ile progress mukilevel securi~ Smalltalk 56 hm beenmade in incorporating into an object-rientcd data Combining modal and nonmodal mndel,,mrr& stillremainsto be done. This articlediscussesthe issuesinvolvedin supporting components to build a picture viewer noncomptrsiteartdcompsite objectsand versioning,which havenot yet been investigated in such W~LaLon& &John Pugh models,becausethesefraruresare exential for data-intensiveapplicationsin hypermediasystems, CAD/CAM, and knowledge-baaedsystems. Book Review 64 Eiffe/, the Language Rmiewed by Stm.n C. Bihw 31 Delegation in C++ byRa~bJohnson &Jouthun M. Zwe& Advertiser Index 66 Delegationis ofren viewedas a languagefealurethat replam inheritance,when in fact ir cart be viewedasa relationshipbetweenobjeccsrhat can be implementedin any object-orientedlanguage. This articleofirs an exampleof this mefuJprogrammingtechniqueusingC++. Career Opportunities 72 & Training Services 35 Real-world reuse byMark brenz Much of the f?crraof object-oriented(O-O) developmenttodayis on rheclaashierarchyand reuse through inheritance.In reality,most of dte classmin an applicationare drawnfrom variousposi- tions in the hierarchyand work together through collaboration.Th]s author dlscusscsO-O analpis and designmedtndologiesand CCICIISchathe believeswillcome inlo wideruseasapplicationdevel- opers foc~ more on thismllabo~[ion and l~s on the hie~rchy. The Journal of Ohjecr-OrientedProgramming(lSSN #OS96-E1438)ispubli.rhedninerimesa year, monthlyexceptfor k4ar/Apr,Jd/Aug, andNov/Dec. Publishedby SIGSPuhlica- riotr.r,Inc., 586 Broadway,Suire604, NewYork, NewYork 10012, (212)274-0640. Pleasedirectadvertisinginquiriest. thisadd~. Secondclasspnsragepaidat NewYork, New York, and additionalmailingoffiw. POSTMASTER: Sendaddreaschangesm JOOP, P.O. Box 3000, Dept. 00P, DenviUe,NJ 07834. Inquirimand newsubscriptionorders &odd dso be sem 10 rfraraddress. @ Copyright 1991 SIGSPublications,Inc. Allrightsresewed.Wpmduction of rhismaterialby electronictmsmiwion, Xerox, or any other merhodwiUbe rrearedasa willhl viola- tionof the US Copyright law and isSarlyprolribired.Materialmaybe reproducedwidrexpressPermision km rhepublisher. Manuscriptsunderreviewshouldbe ~pcd doublespad (in triplicate).Ultorial correspondenceand ProductNw informationshouldbesentto the Editor, Dr. RichardS. Wiener, 2185 Bmadrrtoorhad Clrde, Colorado Sprin&,CO 60906, (719)520-1356. 5 EDITOR Dr. Rich.ardWIcner :..:,. Editorial UniuerriIyofCOhra&,Cob& Spring ,:.,:,+’ SIGS PUBLICATIONS ,.:.:?...., EDITORIAL/ADWSORY BOARD M Them Aiwn4 Objti DcsiP Gndy Booth, RatioMl GWW hnh, Di@talk BradJ. b, Information Agc-&&ting Chuds M, Th Wbitcwatm &up Adete cald~ ParcPhc syrtcmI was t niceto meet with so many of our readen and writers at 00PSLA this past week R. Jo* Kreiidler, &ncrdEhm”c T (October 7–1 1). I found 00PSLA to be an interesting and important conference. Th9m h, Combnt ~ M-, ISE The technical papers at the Cctnkrence focused on experiences wi& object orientation. Mefi P~Joncs, WaykIndS_ 1 The industxy now has some real experiences, both successes and fillures. Some of - Prarap, &wLine .So~rr, Inc. P. Michael Seaahoh, Vemant Object Tech. the mote successful OOP book authors were on hand to discuss their recipes for O-O anal- Bjarne StrouamIp, AT&TBeflLabs ysis, design, and programming. Representatives from the entire 00P industry were pre- mm TSwuua, Object TccbnobgyInk-tnatiod sent. It was evident to me that the move toward making objecr orientation a mainstream JOOP ADVISORY BOARD activity is mntinuing. Of course, it is important to temper this observation by the fact Dtiel Fii, Hewkti-Packardbb. StuaK Gr-etd, Marirt College that whenever one is immersed in a sea of advocates of any technology it is easy to be- IvaIJawb.san, Objti”w Syrtcms lieve that tbe whole world has embraced the technolo~. In reality, this has not yet hap- Boti Magnusmn, Luwd Unim”ty, Swc&n k Phn, Unimi~ ofCohr& pened with object-oriented technology and may take several more years to occur. Many * Wq LfoMIntwtio.1 computer science departments are still teaching their students structured analysis, design, COLUMNISTS and programming techniques exclusively. Some schools have just started offering a few Geo~ Boworth, Dip”tah elective courses on object orientation. Nicliieben B.urbalii, Lucid Inc. Pauf Buttaworth, hi. LOB2 It was clear from the vendor area that most of the products exhibited featured C++ or Paul Harmon, Conridkznt Smalltalk language development or sobare development tools. These two 00P lan- Jon Wyatt Hopbim, Pahdio So@,r Andrew Wg, AT&TBelhb~ guages have “won” the Imguage wars in the commercial sector, at least for the time being. Wdf Wndc, CurferonUniwrriy Application frameworks and CASE tools hr C++ were probably the most popuk prod- John Pugh, G&ton Univw,ig jama Ruinbaugh,Gc~dE&& ucts on display.The -jor application areasthat are pushing 00P bol~ into the rrsain- Tonyw—, IDE strearrsare O-O database management and the development of graphical user interks. C. The- Wu, NaualPwtgr&te School E* Wiener, ProdtiNtws titer We at ]OOP wodd like to report on experienw with object orientation and there- fore plan to produce a special supplement dedicated to tils subject in 1992, I would SIGS PUBLICATIONS, lNC, Iii to solicit contributions now for this special supplement. PI= fo~ow the notrnalJOOP Richard P. Friedman guidelines for submission and mail your manuscripts to the editorial offi~. You are wel- Founder & tip Publisber come to call me at the editorial office to discuss ideas for such contributions, ART/PRODUCTION This issue contains four feature-length articles. Elk VatiaII, Managing Utur “Contravarianw for the R=t of Us” by Warren Harris discusses a structural weakness S- CulliganCreati.Da-ectOr Elii.h A.Upp,ti.-tion Editor of C++ related to overloading. The article suggests areas of needed improvement for b Poher, kktip Desipm c++. CIRCULATION “Multilevel Secure Object-Oriented Data Model: Issues on Noncomposite Objects, Diane Badway, Cin-nluion Burinm ManaIm Gmposite Objects, and Versioning” by Bhavani Thuraisingham examines the issues Iia& ti~ h~fimmt Manager JohnSchreiber,Circuhonhistant related to maintaining multilevel securi~ of data in an object-oriented environment, “Delegation in C++” by Ralph Johnson and Jonathan Zweig ex~ines delegation as MARKETING/!!VERTI SING James ~, Ad&incDircctor a language featme that replaces inheritanm. The titicle explores how delegation may be used in C++. “Real-World Reuse” by Mark hrenz looks at how application developers work with .- ADMINISTRATION and view their application classes and how this relates to analysis, design, and the hier- David h+ Acmunting S-e Wd Dinne&, GnfinccMa~ archy of classes used for an application. J-& FAeI, Arsi.rtanta tbrPublisbcr Laura h Tayfor, &intiwAr.iirtant [email protected] R Monck GmtralManaF I Richard S. Wiener Publishersof]oumalof Object-Oriented Programming Object Mafa>e, Hodim on Objcrt-Orirntcd hogram- ming Tbe C++ @ti, The SmaU R+ti, The Inti- ti”owl 00P DimctoV, and Tbt XJoumal 6 JOOP NOVEMBE~DECEMEiER 1991 z.,;.~,:..~.i;,... ,,:.:J ,., ~,,,.!..ii,.,.,...,..; ~., .-:::“....,.“..:;.:7,r:,. ,.., .,,........,.......... ., ,, . .. .. ,.. ... titi aWorld-ClassP&er . .. ,. Your KSC Guides 00 ANALYSIS Development Team ... to E~ctive a ) solutions ADVANCED TRAINING ~.‘- .. ,, .,.,., .,.. FRAMEWORKS . To build a first rate development team Ksc teams with clients to address Heww-PukaTd that delivers the maximum ben&ts of applimtion areas such w GeneralEfectric object-oriented technology, you want ● Wlsion Support Systems Bell NorthernR~ch ordy the most highly qualified aperts ● Mam.dacturing Information Systems TexasInstruments to guide you. ● Manufacturing Process Modeling American Airfines Financial Transaction Management Boeing Computer Services Knowledge Systems Corporation “ Financial Trading Systems Northern Telecom offers a cohesive program of objm “ Simr_dation Environments Texaco technology traitig, services, and “ Network Management NCR products. Our unparalleled years of “ Custom GUIS ~W@-e . ● ,, .;*p*:*;*mmae ..”ML - ~~, KSCputs you in the ~re~ont of I advanced sopme developmmt. ,::.”:,**ntt+.M~: ~s *.* *hel@,. ., ,,, ,,“’”,;:;y”#*~”a*@eg””, ””’” .+ ,,,in-h~,~X&t’m, md we pro~de time-testedSOIUtiOm ,,,. :!.’-:.: .,, .,,,, .,, ,, ‘,-k”: ... ,,. ..: . .... .W~”*i&’*.b: “ “: ““&M@ Soti for cd- to meet your company’s specific ,,, .,. ,;,.:P,,,,:M ..:... ..:,.”...,-..,.,,~...., ,,.. ... “w,:’:””” “;~.’’””’’”’~+ i ‘:””;”.”””:,,, “~ 00bwralltalk training and {.,~.:.4,..’,,;.<:.’..=.M*”~,:’ ”,.””’ “’;”;,”; ::”””.”’’~gw!~f-; $e) : : ..;.:-:.,.... ... ..,,...:..:;.. ., .,,.,. ,. !.: ,,.:.-7., developmentrequirmts. “:::.!:,;:$::’i:..-~w ““-::’+:““” ‘~ww, . :: . ‘, ,’” ‘,’ hwBedge
Recommended publications
  • Handout 13 Introduction to Object-Oriented Programming in Python
    Handout 13 CS602 – Data-Driven Development with –Fall’20 Page 1 of 5 Handout 13 Introduction to Object-Oriented Programming in Python • Object-oriented programming (OOP) involves programming using objects. • An object represents an entity important for an application; similar objects share the same structure (data/properties/variables) and behavior (functions/methods) • Objects are defined using Class definitions. The concept of ‘Class’ is synonymous with ‘type’. • Each object is an instance of a class. Instance variables are tied to specific objects. Each object has its own instance variables. • In addition, there are class variables, associated with the class and shared by all objects of that class. A Python class uses variables to store data fields and defines methods to perform actions. Additionally, a class provides a special type method, __init__(), known as initializer, which is invoked to initialize the data components of a newly created object. An initializer can perform any action, but initializer is designed to perform initializing actions, such as creating the instance variables (a.k.a. data fields) of an object. EXAMPLE Let’s create a class definition for object type Review. Each review should have a numeric rating, a maximum possible rating and review text. Since these values are going to be different for different Review objects, they define properties of each individual object, thus are called instance variables rating, maxrating and reviewText '''Version 1 of the Review class; includes the __init__ method. Demonstrates instance variables and parameter 'self' - the obligatory reference to the calling object.''' class Review: # Method __init__ is called automatically during class instantiation (a.k.a.
    [Show full text]
  • The Objective-C Programming Language
    Inside Mac OS X The Objective-C Programming Language February 2003 Apple Computer, Inc. Even though Apple has reviewed this © 2002 Apple Computer, Inc. manual, APPLE MAKES NO All rights reserved. WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH No part of this publication may be RESPECT TO THIS MANUAL, ITS reproduced, stored in a retrieval QUALITY, ACCURACY, system, or transmitted, in any form or MERCHANTABILITY, OR FITNESS by any means, mechanical, electronic, FOR A PARTICULAR PURPOSE. AS A photocopying, recording, or RESULT, THIS MANUAL IS SOLD “AS otherwise, without prior written IS,” AND YOU, THE PURCHASER, ARE permission of Apple Computer, Inc., ASSUMING THE ENTIRE RISK AS TO with the following exceptions: Any ITS QUALITY AND ACCURACY. person is hereby authorized to store documentation on a single computer IN NO EVENT WILL APPLE BE LIABLE for personal use only and to print FOR DIRECT, INDIRECT, SPECIAL, copies of documentation for personal INCIDENTAL, OR CONSEQUENTIAL use provided that the documentation DAMAGES RESULTING FROM ANY contains Apple’s copyright notice. DEFECT OR INACCURACY IN THIS The Apple logo is a trademark of MANUAL, even if advised of the Apple Computer, Inc. possibility of such damages. Use of the “keyboard” Apple logo THE WARRANTY AND REMEDIES SET (Option-Shift-K) for commercial FORTH ABOVE ARE EXCLUSIVE AND purposes without the prior written IN LIEU OF ALL OTHERS, ORAL OR consent of Apple may constitute WRITTEN, EXPRESS OR IMPLIED. No trademark infringement and unfair Apple dealer, agent, or employee is competition in violation of federal authorized to make any modification, and state laws.
    [Show full text]
  • Ruby Pocket Reference
    Ruby Pocket Reference Michael Fitzgerald Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo Ruby Pocket Reference by Michael Fitzgerald Copyright © 2007 Michael Fitzgerald. All rights reserved. Printed in Canada. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (safari.oreilly.com). For more information, contact our corporate/ institutional sales department: (800) 998-9938 or [email protected]. Editor: Simon St.Laurent Cover Designer: Karen Montgomery Production Editor: Interior Designer: David Futato Rachel Monaghan Illustrators: Robert Romano and Proofreader: Rachel Monaghan Jessamyn Read Indexer: Ellen Troutman Zaig Printing History: July 2007: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Pocket Reference series designations, Ruby Pocket Reference, the image of a giraffe, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or
    [Show full text]
  • Difference Between Class and Instance Variables Key Difference
    Difference Between Class and Instance Variables www.differencebetween.com Key Difference - Class vs Instance Variables Most modern programming languages support Object Oriented Programming. An object contains data or attributes. An object has certain behaviors. They are known as methods. A program can be model using objects. A software is a collection of programs. Therefore, a software can be designed and implemented using objects. Objects are interacted using methods.Object-Oriented Programming improves code modularity and reusability. There should be a class to create objects. A class is a blueprint to create an object. Therefore, an object is an instance of a class. In programming, the data needed to be stored. Data is stored in memory locations. These memory locations are called variables. A member variable is a variable that is associated with a specific object. It is accessible for all its methods. There are two types of member variables that are class variables and instance variables.The key difference between class and instance variables is that, if there is only one copy of the variable shared with all instance of the class, those variables are called class variables and if each instance of the class has its own copy of the variable, then those variables are called instance variables. What are Class Variables? When there is only one copy of the variable shared with all instance of the class, those variables are called as class variables. Class variables are variables declared within the class outside any method. These variables contain the keyword static.These variables are associated with the class, not to the object.
    [Show full text]
  • The Ruby Workshop
    The Ruby Workshop A New, Interactive Approach to Learning Ruby Akshat Paul Peter Philips Dániel Szabó Cheyne Wallace The Ruby Workshop Copyright © 2019 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Authors: Akshat Paul, Peter Philips, Dániel Szabó, and Cheyne Wallace Technical Reviewers: Jonathan Evans, Jagdish Narayandasani, and Dixitkumar N. Patel Managing Editor: Snehal Tambe Acquisitions Editor: Alicia Wooding Production Editor: Samita Warang Editorial Board: Shubhopriya Banerjee, Bharat Botle, Ewan Buckingham, Megan Carlisle, Mahesh Dhyani, Manasa Kumar, Alex Mazonowicz, Bridget Neale, Dominic Pereira, Shiny Poojary, Abhishek Rane, Erol Staveley, Ankita Thakur, Nitesh Thakur, and Jonathan Wray First Published: October 2019 Production Reference: 3171219 ISBN: 978-1-83864-236-5 Published by Packt Publishing Ltd. Livery Place, 35 Livery Street Birmingham B3 2PB, UK Table of Contents Preface i Chapter 1: Writing and Running Ruby Programs 1 Introduction ...................................................................................................
    [Show full text]
  • Advanced Java
    Advanced Java Sudhanshu Maurya, Published by - Jharkhand Rai University Subject: ADVANCED JAVA Credits: 4 SYLLABUS Overview Of Java Brief history of Java, Java and the web, Java architecture, Basics of a typical Java environment, Java applicationsvs. Java applets, Java Development Kit (JDK) Java and other High level Languages: Comparison of Java with other high level languages, Importance and limitations of Java. Object-oriented Programming Classes and objects, class variables and methods, writing classes, subclasses, files Object-Oriented concepts in Java: Classes in Java, Encapsulation, Polymorphism, Constructors, Garbage collection. Java Programming Design Java’s built-in data types, Java’s inner classes, Operators. Flow-Control Statements Conditional statements, Loop statements, Flow-breaking statements. Reusing Classes Composition syntax, Inheritance syntax, Combining Composition and inheritance, Protected, Incremental development, Initializing and class loading. Introduction to objects The progress of abstraction, Inheritance: reusing the interface, Interchangeable objects with polymorphism, Multithreading, Persistence. Exception Handling And Threading In Java Why use exception handling, Hierarchy of exception classes, Exception handling constructs, Methods available to exceptions, Creating own exception classes Threading: Creating and running a thread, Thread- control methods, Thread life cycle, Thread groups, Thread synchronization, Inter-thread communications, Priorities and scheduling, thread local variables, Daemon threads. Event Handling Ignoring the event, Handling the component in the originating component, Delegating the event Java’s Event Types: Adjustment events, Ancestor events, Component events, Container events, Focus events, Input method events, Internal frame events, Item events, Key events, menu events, Mouse events, Paint events, Pop-up menu events, Text events, Window events. Windows Toolkit Java abstract windowing toolkit, Networking, Modifiers, Packages and interfaces.
    [Show full text]
  • The Java Language Environment a White Paper
    The Java Language Environment A White Paper A Sun Microsystems, Inc. Business 2550 Garcia Avenue Mountain View, CA 94043 U.S.A. 415 960-1300 FAX 415 969-9131 October 1995 The Java Language Environment A White Paper James Gosling Henry McGilton A Sun Microsystems, Inc. Business 2550 Garcia Avenue Mountain View, CA 94043 U.S.A. 415 960-1300 FAX 415 969-9131 October 1995 Copyright Information © 1995 Sun Microsystems, Inc. All rights reserved. 2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A. This BETA quality release and related documentation are protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or related documentation may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Portions of this product may be derived from the UNIX® and Berkeley 4.3 BSD systems, licensed from UNIX System Laboratories, Inc., a wholly owned subsidiary of Novell, Inc., and the University of California, respectively. Third-party font software in this product is protected by copyright and licensed from Sun’s font suppliers. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the United States Government is subject to the restrictions set forth in DFARS 252.227-7013 (c)(1)(ii) and FAR 52.227-19. The release described in this manual may be protected by one or more U.S. patents, foreign patents, or pending applications. TRADEMARKS Sun, the Sun logo, Sun Microsystems, Solaris, HotJava, and Java are trademarks or registered trademarks of Sun Microsystems, Inc.
    [Show full text]
  • Object-Oriented Programming
    Object-Oriented Programming School of Computer Science University of KwaZulu-Natal February 5, 2007 Object Oriented Programming using Java Notes for the Computer Science Module Object Oriented Programming COMP200 Adapted from Introduction to Programming Using Java Version 5.0, December 2006 by David J. Eck http://math.hws.edu/javanotes/ Adapted by Anban Pillay School of Computer Science University of KwaZulu-Natal Durban February 2007 3 4 Contents 1 Introduction to Objects 11 1.1 What is Object Oriented Programming? . 11 1.1.1 Programming Paradigms . 12 1.1.2 Object Orientation as a New Paradigm: The Big Picture . 14 1.2 Fundamentals of Objects and Classes . 16 1.2.1 Objects and Classes . 16 1.2.2 Class Members and Instance Members . 22 1.2.3 Access Control . 27 1.2.4 Creating and Destroying Objects . 29 1.2.5 Garbage Collection . 34 1.2.6 Everything is NOT an object . 35 2 The Practice of Programming 37 2.1 Abstraction . 37 2.1.1 Control Abstraction . 38 2.1.2 Data Abstraction . 39 2.1.3 Abstraction in Object-Oriented Programs . 39 2.2 Methods as an Abstraction Mechanism . 40 2.2.1 Black Boxes . 40 2.2.2 Preconditions and Postconditions . 41 2.2.3 APIs and Packages . 42 2.3 Introduction to Error Handling . 46 2.4 Javadoc . 49 2.5 Creating Jar Files . 51 2.6 Creating Abstractions . 52 2.6.1 Designing the classes . 52 2.7 Example: A Simple Card Game . 58 3 Tools for Working with Abstractions 63 3.1 Introduction to Software Engineering .
    [Show full text]
  • The Objective-C 2.0 Programming Language
    The Objective-C 2.0 Programming Language General 2009-02-04 Even though Apple has reviewed this document, APPLE MAKES NO WARRANTY OR REPRESENTATION, Apple Inc. EITHER EXPRESS OR IMPLIED, WITH RESPECT TO © 2009 Apple Inc. THIS DOCUMENT, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR All rights reserved. PURPOSE. AS A RESULT, THIS DOCUMENT IS PROVIDED “AS IS,” AND YOU, THE READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY No part of this publication may be reproduced, AND ACCURACY. stored in a retrieval system, or transmitted, in IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, any form or by any means, mechanical, INDIRECT, SPECIAL, INCIDENTAL, OR electronic, photocopying, recording, or CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT, even otherwise, without prior written permission of if advised of the possibility of such damages. Apple Inc., with the following exceptions: Any THE WARRANTY AND REMEDIES SET FORTH ABOVE person is hereby authorized to store ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL documentation on a single computer for OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make personal use only and to print copies of any modification, extension, or addition to this documentation for personal use provided that warranty. the documentation contains Apple’s copyright Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or notice. consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives The Apple logo is a trademark of Apple Inc.
    [Show full text]
  • The Science of Computing II Living with Cyber Lesson 5: the Object
    The Science of Computing II Living with Cyber Lesson 5: The Object-Oriented (OO) Paradigm Pillar: Computer Programming As discussed in lessons early in the curriculum, three paradigms of programming languages have emerged over the years: the imperative paradigm, the functional paradigm, and the logical paradigm. A language is classified as belonging to a particular paradigm based on the programming features it supports. In addition, during the past decade or so these paradigms have been extended to include object-oriented features. Some computer scientists view object-oriented programming as a fourth paradigm. Others prefer to view it as an extension to the imperative, functional, and logical paradigms, in that object-oriented constructs and behaviors are often viewed as higher-level organizational attributes that can be incorporated into each of the three basic paradigms, rather than as a separate programming paradigm unto itself. Object-oriented concepts have revolutionized programming languages. The vast majority of widely used programming languages are now object-oriented. In fact, they are, by far, the most popular type of programming languages. Python, Java, and C++ are object-oriented, imperative languages. Specifically, Python is an imperative, interpreted language that can optionally be object-oriented. That is, non-object-oriented programs can be written in Python if desired. In a sense, this makes Python quite powerful (like a Swiss army knife of programming). The object-oriented paradigm is an elegant and clean way to conceptually think about computer programming. When used properly, it can produce programs that are more robust, less likely to have errors, and are easy for others to understand and modify.
    [Show full text]