The Essence of Object Oriented Programming with Java and UML

Total Page:16

File Type:pdf, Size:1020Kb

The Essence of Object Oriented Programming with Java and UML Contents The Essence of Object Oriented Programming with Java and UML by Bruce E. Wampler, Ph.D. Contents Preface Why This Book? Who Is This Book For? Overview of Chapters About the Author Acknowledgements Chapter 1: Objects, UML, and Java Introduction Object Orientation Object-Oriented Languages Object-Oriented Design and the UML The Payoff of Objects Chapter Summary Chapter 2: The Essence of Objects What Is an Object-Oriented System? file:///C|/oobook/EOOPTOC.html (1 of 8) [13/03/2003 02:55:02 }Ç Contents Fundamental Properties of an Object-Oriented System Abstraction with Objects Encapsulated Classes Communication via messages Object Lifetime Class Hierarchies Polymorphism An Example - Putting it All Together Other OO Concepts Abstract Classes Visibility of Methods Class vs. Instance Accessing Objects A Low-Level View of Objects Chapter Summary Resources Object-Orientation UML Chapter 3: Objects in Java Defining Classes in Java Visibility Inheritance Association, Aggregation, and Composition Java Interfaces Object lifetime in Java Constructors Garbage collection Memory leaks Class vs. Instance methods and attributes Copies of Objects Messages Chapter Summary Resources file:///C|/oobook/EOOPTOC.html (2 of 8) [13/03/2003 02:55:02 }Ç Contents Java Chapter 4: Object-Oriented Analysis and Design Software Methodologies The Elements of a Software Project The Essence of Object-Oriented Analysis Object Discovery Evaluate Candidate Objects Determine Object Hierarchies Discover Object Attributes Discover Object Operations The Essence of Object-Oriented Design Some Design Guidelines Get The Big Picture Encapsulation Designing Classes Inheritance General Guidelines The Build and Release Phases Building the Software Releasing the Software More on the UML Chapter Summary Resources OOAD CRC Chapter 5: Object-Oriented Graphical User Interfaces with Swing Graphical User Interfaces A Typical Application Dialog Boxes Events file:///C|/oobook/EOOPTOC.html (3 of 8) [13/03/2003 02:55:02 }Ç Contents A Brief Introduction to Swing Handling Swing Command Events A Bunch of Options MVC: Model, View, Controller MVC with Java A Small Swing MVC GUI Framework A Simple Application Based on Wmvc UML Sequence Diagram for Thermometer Chapter Summary Resources Swing Chapter 6: A Case Study in Java Analysis of MovieCat Use Cases Object, Attribute, and Operation Discovery Evaluation Design of MovieCat Movie Class MovieModel Class View Classes Putting It All Together Implementation of MovieCat MovieCat Class Movie Class MovieModel Class MainView Class MovieListView Class MovieItemView Class MovieEditor Class Movie Helper Classes Review Chapter Summary file:///C|/oobook/EOOPTOC.html (4 of 8) [13/03/2003 02:55:02 }Ç Contents Chapter 7: Design Patterns What are Design Patterns? Using Design Patterns Design Pattern Description Template The Gang of Four Patterns Creational Patterns Structural Patterns Behavioral Patterns Example Design Patterns used by Wmvc and MovieCat MVC Observer Pattern Observer Pattern in Wmvc Command Pattern in Wmvc Other Patterns used in Wmvc and MovieCat Chapter Summary Resources Chapter 8: Refactoring What is Refactoring? The Basic Refactoring Process When Do You Refactor? Code Smells When not to refactor Some Refactorings Refactoring Categories Some Specific Refactorings Chapter Summary Resources Chapter 9: Software Development Methodologies Methodologies for Large Scale Projects Overview of the Unified Process file:///C|/oobook/EOOPTOC.html (5 of 8) [13/03/2003 02:55:02 }Ç Contents Basic Concepts Agile Methodologies for Small Projects The Agile Alliance eXtreme Programming DSDM Crystal - Adaptive Software Development Open Source Development Open Source is Distributed Development Resources Methodologies Web Sites Chapter 10: Software Tools for Object-Oriented Development GUIs vs. Consoles Editors and IDEs Emacs Vi Integrated Development Environments VIDE Borland JBuilder Sun Forte Other IDEs Source code control CASE, Modeling, and UML Tools ArgoUML MagicDraw Rational Software TogetherSoft Other UML Tools Other Java Tools JUnit Jikes file:///C|/oobook/EOOPTOC.html (6 of 8) [13/03/2003 02:55:02 }Ç Contents Chapter 11: Programming - A Personal Perspective Programming Your Code Never Dies Program With Style Know What You Are Doing Write Practice Programs Practice Incremental Programming The Tools Matter Objects Really Help Testing Debugging Don't Reinvent the Wheel Sometimes It is Better to Do It Yourself You Can Get Ideas Any Time Get A Life A Plan Matters The Tools Your Editor Really Matters Know About the Time-Tested Tools Know About the Latest Tools Tools Go Away The Work Environment A Happy Programmer is a Productive Programmer Physical Environment Flexibility 40 Hours The Team Marketing Matters Keep Up To Date Share the Struggle Let Programmers Help Make Policy Let Your Boss Know What You Need The Reference Software Story Programming Resources Use The Web file:///C|/oobook/EOOPTOC.html (7 of 8) [13/03/2003 02:55:02 }Ç Contents Watch Out for the Web Use Open Source, If You Can Other Programmers Web Sites Chapter 12: What Next? Object Orientation Java More Terms You Need To Know Distributed Computing Java Related Terms from Sun Other Terms Glossary med for Flyheart file:///C|/oobook/EOOPTOC.html (8 of 8) [13/03/2003 02:55:02 }Ç Why This Book? Preface Why This Book? The goal of this book is to cover the essence of what you need to know to develop object-oriented software using Java and UML. When you are through with this book, you should understand object- oriented software development well enough to answer the following questions: ● What is object orientation? ● What is the UML? ● What is Object-Oriented Analysis and Design? ● How do you do OOAD? ● What are object-oriented development methodologies? ● How do you use Java to write truly object-oriented programs? ● What is Swing, and how can you use it to write object-oriented graphical user interfaces? ● What are design patterns? ● What is refactoring? ● What tools do you use to write object-oriented programs? ● What are some guidelines for writing good code? ● What do I need to read next to learn even more about object orientation? Who Is This Book For? This book is intended for programmers who know the basics of file:///C|/oobook/Preface.html (1 of 6) [13/03/2003 02:55:04 }Ç Why This Book? programming with Java, and now want to understand the fundamentals of object-oriented software development. If you're fairly new to programming, and have had a class or two in Java, you're probably starting to feel comfortable using Java. So now, you're ready to really reap the benefits of true object-orientated programming in Java, and this book will help you. If you're an experienced programmer who wants to move from using an old style procedural programming language to developing object- oriented systems in Java, this book is also for you. This book will get you well down the path to real object-oriented software development. You will likely be able to learn the most important aspects of Java from the examples included in this book if you have a Java manual available for quick reference. However, this book should not be the last one you read on object orientation, the UML, or Java. Instead, it should give you the essential understanding of objects so you can read more advanced and detailed books on the topic with greater purpose. Overview of Chapters Chapter 1 is a brief introduction to objects and the benefits of object- oriented software development. Chapter 2 covers the fundamental concepts of object orientation. Object orientation has many important concepts, and of course, its own vocabulary. It is very important for you to understand the main concepts, and to be familiar with the specialized vocabulary. Even if you already are familiar with some object-oriented concepts, you should review them in this chapter. Chapter 3 covers how to use Java to write object-oriented programs. It is not really a Java tutorial, but rather concentrates on using Java to file:///C|/oobook/Preface.html (2 of 6) [13/03/2003 02:55:04 }Ç Why This Book? implement object-oriented concepts. The first part of the chapter covers very basic Java concepts. However, the later parts of the chapter cover more advanced topics such as object lifetime, copies of objects, and other concepts that are very important when working with classes and objects. Chapter 4 covers Object-Oriented Analysis and Design (OOAD). Rather than focusing on any specific OOAD methodology, Chapter 4 covers the basic concepts that are important for any methodology. The first four chapters cover the essence of object orientation. Chapter 5 takes a look at Graphical User Interfaces (GUIs) and the Java Swing library using the object-oriented perspective developed in the previous chapters. This object-oriented introduction to Swing is a somewhat different approach than is typically found in Swing tutorials. Chapter 6 ties everything together with a case study of a small Java application. The fundamental OOAD concepts covered in Chapter 4 are used to design the application, and the Java and Swing concepts covered in Chapter 3 and 5 are used for the implementation. The remainder of the book is less comprehensive in its treatment. The goal is to give you a good overview of the practical aspects of object- oriented programming. Chapter 7 introduces Design Patterns, a recent development that uses previously developed software design patterns to help make designing new software easier. Chapter 8 covers Refactoring, which is a disciplined object-oriented approach to revising and enhancing existing software. Chapter 9 gives brief overviews of some of the current software development methodologies for both large and small-scale object-oriented software projects. Chapter 10 covers some of the current software tools available for developing object-oriented software. Finally, Chapter 11 gives some of my personal guidelines for developing better software. file:///C|/oobook/Preface.html (3 of 6) [13/03/2003 02:55:04 }Ç Why This Book? About the Author I wrote my first program more than 30 years ago, and I have been developing software ever since.
Recommended publications
  • Ece351 Lab Manual
    DEREK RAYSIDE & ECE351 STAFF ECE351 LAB MANUAL UNIVERSITYOFWATERLOO 2 derek rayside & ece351 staff Copyright © 2014 Derek Rayside & ECE351 Staff Compiled March 6, 2014 acknowledgements: • Prof Paul Ward suggested that we look into something with vhdl to have synergy with ece327. • Prof Mark Aagaard, as the ece327 instructor, consulted throughout the development of this material. • Prof Patrick Lam generously shared his material from the last offering of ece251. • Zhengfang (Alex) Duanmu & Lingyun (Luke) Li [1b Elec] wrote solutions to most labs in txl. • Jiantong (David) Gao & Rui (Ray) Kong [3b Comp] wrote solutions to the vhdl labs in antlr. • Aman Muthrej and Atulan Zaman [3a Comp] wrote solutions to the vhdl labs in Parboiled. • TA’s Jon Eyolfson, Vajih Montaghami, Alireza Mortezaei, Wenzhu Man, and Mohammed Hassan. • TA Wallace Wu developed the vhdl labs. • High school students Brian Engio and Tianyu Guo drew a number of diagrams for this manual, wrote Javadoc comments for the code, and provided helpful comments on the manual. Licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) version 2.5 or greater. http://creativecommons.org/licenses/by-sa/2.5/ca/ http://creativecommons.org/licenses/by-sa/3.0/ Contents 0 Overview 9 Compiler Concepts: call stack, heap 0.1 How the Labs Fit Together . 9 Programming Concepts: version control, push, pull, merge, SSH keys, IDE, 0.2 Learning Progressions . 11 debugger, objects, pointers 0.3 How this project compares to CS241, the text book, etc. 13 0.4 Student work load . 14 0.5 How this course compares to MIT 6.035 .......... 15 0.6 Where do I learn more? .
    [Show full text]
  • CS 403/503: Programming Languages
    BNF for <expression> <expression> → identifier | number | CS 403 -<expression> | (<expression>) | <expression><operator><expression> Organization of Programming Languages <operator> → + | - | * | / Class 3 - August 30, 2001 Topics For Today Parse Tree Review of BNF (Chapter 2.1) Derivations and parse trees (Chapter 2.1) Binding time (Chapter 3.1) Object lifetime and storage slope * x + intercept management (Chapter 3.2) BNF Concept Review Another Parse Tree Terminal symbols: Actual items that are part of the language (0,1,+,-,*,/,etc.) Non-Terminal symbols: <expr>, <op>, etc. Rule/production: A single line of BNF Alternatives: Expressed with | Also: slope * x + intercept *: 0 or more occurrences +:1 or more occurrences 1 Binding Lifetimes • Binding lifetime: The period of time Def: A binding is an association, such between the creation and destruction of a as between an attribute and an entity, name-to-object binding • Object lifetime: The period of time or between an operation and a between the creation and destruction of symbol. an object • These don’t necessarily coincide Def: Binding time is the time at which a • EX. Reference parameters binding takes place. Possible binding times Object Lifetimes… 1. Language design time--e.g., bind operator …correspond to one of three principal symbols to operations 2. Language implementation time--e.g., bind fl. pt. storage allocation mechanisms: type to a representation Static objects: Object lifetime = program 3. Compile time--e.g., bind a variable to a type in C execution. Object bound to one storage or Java location from load time on. 4. Load time--e.g., bind a FORTRAN 77 variable to a memory cell (or a C static variable) Stack objects: Object lifetime = subroutine 5.
    [Show full text]
  • C++/CLI Language Specification
    Ecma/TC39-TG5/2004/25 C++/CLI Language Specification Working Draft 1.5, Jun, 2004 Public Review Document Text highlighted like this indicates a placeholder for some future action. It might be a note from the editor to himself, or an indication of the actual or expected direction of some as-yet open issue. Note: In the spirit of the "Working Draft, Standard for Programming Language C++", this is an early draft. It’s known to be incomplet and incorrekt, and it has lots of bad formatting. Publication Time: 6/17/2004 11:44 PM Table of Contents Table of Contents Introduction....................................................................................................................................................xi 1. Scope............................................................................................................................................................. 1 2. Conformance ............................................................................................................................................... 2 3. Normative references .................................................................................................................................. 3 4. Definitions .................................................................................................................................................... 4 5. Notational conventions................................................................................................................................ 7 6. Acronyms and abbreviations
    [Show full text]
  • C# Programming in Depth Lecture 4: Garbage Collection & Exception
    Chair of Software Engineering C# Programming in Depth Prof. Dr. Bertrand Meyer March 2007 – May 2007 Lecture 4: Garbage Collection & Exception Handling Lisa (Ling) Liu Overview Scope and lifetime Garbage collection mechanism Exception handling C# programming lecture 4: Garbage Collection & Exception Handling 2 Scope and lifetime Scope of a variable is portion of program text within which it is declared ¾ Need not be contiguous ¾ In C#, is static: independent of data Lifetime or extent of storage is portion of program execution during which it exists ¾ Always contiguous ¾ Generally dynamic: dependent on data Class of lifetime ¾ Static: entire duration of program ¾ Local or automatic: duration of call or block execution (local variable) ¾ Dynamic: From time of allocation statement (new) to deallocation, if any. C# programming lecture 4: Garbage Collection & Exception Handling 3 Object lifetime in C# Memory allocation for an object should be made using the “new” keyword Objects are allocated onto the managed heap, where they are automatically deallocated by the runtime at “some time in the future” Garbage collection is automated in C# Rule: Allocate an object onto the managed heap using the new keyword and forget about it C# programming lecture 4: Garbage Collection & Exception Handling 4 Object creation When a call to new is made, it creates a CIL “newobj” instruction to the code module public static int Main (string[] args) { Car c = new Car(“Viper”, 200, 100); } IL_000c: newobj instance void CilNew.Car::.ctor (string, int32,
    [Show full text]
  • Metaprogramming in .NET by Kevin Hazzard Jason Bock
    S AMPLE CHAPTER in .NET Kevin Hazzard Jason Bock FOREWORD BY Rockford Lhotka MANNING Metaprogramming in .NET by Kevin Hazzard Jason Bock Chapter 1 Copyright 2013 Manning Publications brief contents PART 1DEMYSTIFYING METAPROGRAMMING ..............................1 1 ■ Metaprogramming concepts 3 2 ■ Exploring code and metadata with reflection 41 PART 2TECHNIQUES FOR GENERATING CODE ..........................63 3 ■ The Text Template Transformation Toolkit (T4) 65 4 ■ Generating code with the CodeDOM 101 5 ■ Generating code with Reflection.Emit 139 6 ■ Generating code with expressions 171 7 ■ Generating code with IL rewriting 199 PART 3LANGUAGES AND TOOLS ............................................221 8 ■ The Dynamic Language Runtime 223 9 ■ Languages and tools 267 10 ■ Managing the .NET Compiler 287 v Metaprogramming concepts In this chapter ■ Defining metaprogramming ■ Exploring examples of metaprogramming The basic principles of object-oriented programming (OOP) are understood by most software developers these days. For example, you probably understand how encapsulation and implementation-hiding can increase the cohesion of classes. Languages like C# and Visual Basic are excellent for creating so-called coarsely grained types because they expose simple features for grouping and hiding both code and data. You can use cohesive types to raise the abstraction level across a system, which allows for loose coupling to occur. Systems that enjoy loose cou- pling at the top level are much easier to maintain because each subsystem isn’t as dependent on the others as they could be in a poor design. Those benefits are realized at the lower levels, too, typically through lowered complexity and greater reusability of classes. In figure 1.1, which of the two systems depicted would likely be easier to modify? Without knowing what the gray circles represent, most developers would pick the diagram on the right as the better one.
    [Show full text]
  • Generating Object Lifetime Traces with Merlin
    Generating Object Lifetime Traces with Merlin MATTHEW HERTZ University of Massachusetts, Amherst STEPHEN M BLACKBURN Australian National University J ELIOT B MOSS University of Massachusetts, Amherst KATHRYN S McKINLEY University of Texas at Austin and DARKO STEFANOVIC´ University of New Mexico ÈÖÓÖÑÑÖ× Ö ÛÖØÒ ÖÔÐÝ ÖÓÛÒ ÒÙÑ Ö Ó ÔÖÓÖÑ× Ò Ó Ø ÐÒÙ׸ × ÂÚ Ò ¸ ØØ ÖÕÙÖ Ö Ö Ò ×ÑÙÐØÓÒ ×Ô ÜÔÐÓÖØÓÒ ÙÔ Ý ÒÐÒ Ô Ö ÙÒÖ×ØÒÒ× Ó Ó ÐØÑ ÚÓÖ Ò Ò ×Ò Ó ÒÛ Ö ÐÓÖØÑ׺ ÏÒ ÒÖØÒ Ô Ø ÖÙعÓÖ ÑØÓ Ó Ó ÐØÑ× ÖÕÙÖ× ÛÓÐ¹Ô Ö Ø ÚÖÝ Ô ÓØÒØÐ Ô ÓÒØ Ò Ø ÔÖÓÖѺ Ø× ÔÖÓ × ÔÖÓØÚÐÝ ÜÔ Ò×Ú¸ Ö× ÓØÒ ÒÙÐØ Ý ÓÒÐÝ Ô ÖÓ ¸ ºº¸ ÚÖÝ ¿¾Ã ÝØ× Ó ÐÐÓ Ù× Ö Û Ï ÜØÒ Ø ×ØØ Ó Ø ÖØ ÓÖ ×ÑÙÐØÒ Ö ÐÓÖØÑ× Ò ØÛÓÛÝ׺ Ö×ظ ÚÐÓÔ ÑØÓ ÓÐÓÝ ÓÖ ×ÑÙÐØÓÒ ×ØÙ× Ó ÝÒ Ö Ò ÔÖ×ÒØ Ö×ÙÐØ× ×ÓÛÒ Ø Ó ÖÒÙÐÖØÝ ÓÒ Ø× ×ÑÙÐØÓÒ׺ Ï ×ÓÛ ØØ ÖÒÙÐÖØÝ ÓØÒ ×ØÓÖØ× ×ÑÙÐØ Ö Ö×ÙÐØ× ÛØ Ô Û ÓÖ Ó ÔÖ×ÒØ Ò Ñ×ÙÖ Ø Ô Ó ÒÛ ÐÓÖØÑ ÅÖÐÒ ÐØÑ׺ ÅÖÐÒ ØÑ×ØÑÔ× Ó Ò ÐØÖ Ù×× Ø ØÑ×ØÑÔ× Ó Ó ØÓ ÛÒ ØÝ º Ì ÅÖÐÒ ÐÓÖØÑ × ÓÒ Ö Ô ÖÓÖÑ Ý Ø × ÖÑÒØÐ Ö×ÙÐØ× ×ÓÛ ØØ ÅÖÐÒ ÒÖØ ÓÚÖ ØÛÓ ÓÖÖ× Ó ÑÒØÙ ×Ý×ØѺ ÜÔ ×ØÖ ØÒ Ø ÑØÓ ØÖ ÚÖÝ Ó ÐÐÓ Ï Ð×Ó Ù× ÅÖÐÒ ØÓ ÔÖÓ Ú×ÙÐÞØÓÒ× Ó Ô ÚÓÖ ØØ ÜÔ Ó× ÒÛ Ó ÐØÑ ÚÓÖ׺ Categories and Subject Descriptors: D.3.4 [Programming Languages]: Processors—memory management (gar- bage collection) ÒÖÐ ÌÖÑ× ÐÓÖØÑ׸ ÄÒÙ׸ È ØÓÒÐ ÃÝ ÏÓÖ× Ò ÈÖ×× Ö ×Ò¸ Ó ÐØÑ ÒÐÝ×׸ ÒÖØÓÒ This work is supported by NSF grants CCR-0219587, ITR CCR-0085792, EIA-0218262, EIA-9726401, EIA- 030609, EIA-0238027, EIA-0324845, DARPA F33615-03-C-4106, Hewlett-Packard gift 88425.1, Microsoft Re- search, and IBM.
    [Show full text]
  • Modern C++ Object-Oriented Programming
    CPP Modern C++ Object-Oriented Programming ''Combine old and newer features to get the best out of the language'' Margit ANTAL 2020 C++ - Object-Oriented Programming Course content − Introduction to C++ − Object-oriented programming − Generic programming and the STL − Object-oriented design C++ - Object-Oriented Programming References − Bjarne Stroustrup, Herb Sutter, C++ Core Guidelines, 2017. rd − M. Gregoire, Professional C++, 3 edition, John Wiley & Sons, 2014. th − S. Lippman, J. Lajoie, B. E. Moo, C++ Primer, 5 edition, Addison Wesley, , 2013. th − S. Prata, C++ Primer Plus, 6 edition, Addison Wesley, 2012. − N. Josuttis, The C++ standard library. a tutorial and reference. Pearson Education. 2012. − A. Williams, C++ Concurrency in Action:Practical Multithreading. Greenwich, CT: Manning. 2012. Module 1 Introduction to C++ Introduction to C++ Content − History and evolution − Overview of the key features ● New built-in types ● Scope and namespaces ● Enumerations ● Dynamic memory: new and delete ● Smart pointers: unique_ptr, shared_ptr, weak_ptr ● Error handling with exceptions ● References ● The const modifier Introduction to C++ History and evolution − Creator: Bjarne Stroustrup 1983 − Standards: ● The first C++ standard − 1998 (C++98, major) − 2003 (C++03, minor) ● The second C++ standard − 2011 (C++11, major) – significant improvements in language and library − 2014 (C++14, minor) − 2017 (C++17, major) Introduction to C+ History and evolution − source: https://isocpp.org/std/status Introduction to C+ History and evolution − source:
    [Show full text]
  • Name, Scope and Binding (2) in Text: Chapter 5
    Name, Scope and Binding (2) In Text: Chapter 5 N. Meng, F. Poursardar Variable • A program variable is an abstraction of a memory cell or a collection of cells • It has several attributes – Name: A mnemonic character string – Address – Type 2 Variable Attributes (continued) • Storage Bindings – Allocation o Getting a memory cell from a pool of available memory to bind to a variable – Deallocation o Putting a memory cell that has been unbound from a variable back into the pool • Lifetime – The lifetime of a variable is the time during which it is bound to a particular memory cell 3 Object Lifetime and Storage Management • Key events: creation of objects, creation of bindings, references to variables (which use bindings), (temporary) deactivation of bindings, reactivation of bindings, destruction of bindings, and destruction of objects. • Binding lifetime: the period of time from creation to destruction of a name-to-object binding. • Object lifetime: the time between the creation and destruction of an objects is the object’s lifetime: – If object outlives binding it's garbage. – If binding outlives object it's a dangling reference. • Scope: the textual region of the program in which the binding is active; we sometimes use the word scope as a noun all by itself, without an indirect object. Lifetime • If an object’s memory binding outlives its access binding, we get garbage • If an object’s access binding outlives its memory binding, we get a dangling reference • Variable lifetime begins at allocation, and ends at deallocation either by the program or garbage collector 5 Categories of Variables by Lifetimes • Static • Stack-dynamic • Explicit heap-dynamic • Implicit heap-dynamic Storage Allocation Mechanisms • Static: objects are given an absolute address that is retained throughout the program’s execution.
    [Show full text]
  • Memory Management Programming Guide
    Memory Management Programming Guide Performance 2010-06-24 PROVIDED “AS IS,” AND YOU, THE READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY Apple Inc. AND ACCURACY. © 2010 Apple Inc. IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, All rights reserved. INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT, even No part of this publication may be reproduced, if advised of the possibility of such damages. stored in a retrieval system, or transmitted, in THE WARRANTY AND REMEDIES SET FORTH ABOVE any form or by any means, mechanical, ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple electronic, photocopying, recording, or dealer, agent, or employee is authorized to make otherwise, without prior written permission of any modification, extension, or addition to this Apple Inc., with the following exceptions: Any warranty. person is hereby authorized to store Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or documentation on a single computer for consequential damages, so the above limitation or personal use only and to print copies of exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have documentation for personal use provided that other rights which vary from state to state. the documentation contains Apple’s copyright notice. The Apple logo is a trademark of Apple Inc. Use of the “keyboard” Apple logo (Option-Shift-K) for commercial purposes without the prior written consent of Apple may constitute trademark infringement and unfair competition in violation of federal and state laws.
    [Show full text]
  • Contents Credits & Contacts
    Overload issue 63 october 2004 contents credits & contacts Overload Editor: The Encapsulate Context Pattern Alan Griffiths Allan Kelly 6 [email protected] [email protected] Microsoft Visual C++ and Win32 Contributing Editor: Structured Exception Handling Mark Radford [email protected] Roger Orr 15 A Mini-project to Decode a Advisors: Mini-language Thomas Guest 20 Phil Bass [email protected] Garbage Collection and Object Lifetime Thaddaeus Frogley Ric Parkin 24 [email protected] Richard Blundell C++ Lookup Mysteries [email protected] Sven Rosvall 28 Advertising: Chris Lowe [email protected] Overload is a publication of the ACCU. For details of the ACCU and other ACCU publications and activities, see the ACCU website. ACCU Website: http://www.accu.org/ Information and Membership: Join on the website or contact David Hodge [email protected] Publications Officer: John Merrells [email protected] ACCU Chair: Ewan Milne [email protected] 3 Overload issue 63 october 2004 Editorial: The Buzzword Adoption Pattern? n my last editorial (in Overload 60, called “An Industry That Refuses to Learn”) I asserted that the software development industry has not made significant progress Iin the last quarter of a century. This assertion provoked enough of a response to fill the letters page in the following issue. I’m pleased about that, but at the same time, not so pleased. I’m pleased because I managed to provoke people into putting pen to paper – or rather, in this day and age, putting fingers to keyboard. I’m not so pleased because the response was one of overwhelming agreement, which is unfortunate because it suggests that any hopes I may have had that my experience is the odd one out, are false.
    [Show full text]
  • Increased Efficiency in Finite Element Computations Through Template
    Increased Efficiency In Finite Element Computations Through Template Metaprogramming Karl Rupp Christian Doppler Laboratory for Reliability Issues in Microelectronics at the Institute for Microelectronics, TU Wien Gußhausstraße 27–29/E360, A-1040 Wien, Austria [email protected] Keywords: Template Metaprogramming, Finite Elements, ble selection of the functionality needed for a particular prob- Symbolic Integration, lem at compile time. In order to decouple algorithms acting on a certain geom- Abstract etry, a general way to store and access quantities on domain In the area of scientific computing, abstraction was long said elements is necessary. Our approach works for quantities of to be achievable only in exchange for run time efficiency. arbitrary types and is discussed in Sec. 3. With the rise of template metaprogramming [1] in C++ in The first step towards FEM discretizations is to derive the the 1990s, run time efficiency comparable to hand tuned code weak formulation, which is for second order PDEs obtained could be achieved for isolated operations such as matrix- by multiplication with a test function v, integration over the vector multiplication [2]. In more complex scenarios such whole domain and integration by parts. The generic proce- as large finite element simulation packages, traditional object dure then is to select a suitable basis for a finite dimensional oriented programmingis used for most abstractions, so the re- space of test functions and similarly for trial functions, which sulting code usually suffers from reduced run time efficiency. ultimately leads to a system of linear equations that can be We have applied rigorous template metaprogramming to both solved by either direct or iterative solvers.
    [Show full text]
  • Objective-C Fundamentals
    Christopher K. Fairbairn Johannes Fahrenkrug Collin Ruffenach MANNING Objective-C Fundamentals Download from Wow! eBook <www.wowebook.com> Download from Wow! eBook <www.wowebook.com> Objective-C Fundamentals CHRISTOPHER K. FAIRBAIRN JOHANNES FAHRENKRUG COLLIN RUFFENACH MANNING SHELTER ISLAND Download from Wow! eBook <www.wowebook.com> For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 261 Shelter Island, NY 11964 Email: [email protected] ©2012 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled
    [Show full text]