List of Tables

 < Day Day Up > 



Chapter 2: Small Victories—Creating Projects With IDE’s

Figure 2-1: The Program Creation Process
Figure 2-2: Creating a New Project in CodeWarrior
Figure 2-3: Selecting Stationery and Naming Project
Figure 2-4: Setting a Project’s Location
Figure 2-5: Select Project Type
Figure 2-6: FirstClass Project Window
Figure 2-7: Sources Group Open Revealing HelloWorld.cp
Figure 2-8: Creating New Text File
Figure 2-9: Editing firstclass.h
Figure 2-10: Adding Files to Project
Figure 2-11: firstclass.cpp and main.cpp Added, HelloWorld.cp Removed
Figure 2-12: FirstClass Project Output
Figure 2-13: Creating New Visual C++ Project
Figure 2-14: Naming the Project
Figure 2-15: Selecting Console Application Type
Figure 2-16: New Project Information Window
Figure 2-17: Workspace Environment with ClassView Selected
Figure 2-18: Edited Project1.cpp File
Figure 2-19: Adding New C++ Header File to Project 1
Figure 2-20: File Name Entered
Figure 2-21: Editing firstclass.h
Figure 2-22: Creating a New C++ Source File
Figure 2-23: Linking...Message and Results of Building Project 1
Figure 2-24: Running Project1.exe
Figure 2-25: Creating firstclass.h with Emacs
Figure 2-26: Creating makefile with Emacs
Figure 2-27: Running the make Utility
Figure 2-28: Results of Executing make Utility and firstprog

Chapter 3: Project Walkthrough—An Extended Example

Figure 3-1: Tight Spiral Development Cycle Deployment
Figure 3-2: Robot Rat Viewed As Attributes
Figure 3-3: Robot Rat Floor Sketch
Figure 3-4: Complete Robot Rat Attributes
Figure 3-5: Functional Decomposition of Robot Rat Program
Figure 3-6: Overview of Project Creation Process
Figure 3-7: robotrat.h
Figure 3-8: robotrat.cpp
Figure 3-9: main.cpp
Figure 3-10: Robot Rat Menu
Figure 3-11: robotrat.h
Figure 3-12: main.cpp
Figure 3-13: Test Results
Figure 3-14: Default Case Test
Figure 3-15: robotrat.cpp with Floor Array Declaration
Figure 3-16: robotrat.h with ROWS & COLS Constants Declared
Figure 3-17: The printFloor() Function
Figure 3-18: Robot Rat printFloor() Function Test
Figure 3-19: setTestPattern() Function
Figure 3-20: setTestPattern() Function Being Used for Test-ing in the printFloor() Function.
Figure 3-21: Robot Rat printFloor() Test with Test Pattern
Figure 3-22: State Transition Diagram for rats_direction Variable.
Figure 3-23: State Transition Diagram for pen_position
Figure 3-24: Direction and PenPosition Enum Types Added to robotrat.h
Figure 3-25: Declaration of pen_position & rats_position
Figure 3-26: setPenUp() & setPenDown() Functions
Figure 3-27: turnRight() Function
Figure 3-28: turnLeft() Function
Figure 3-29: turnLeft() Function with cout Statements
Figure 3-30: turnLeft() Test
Figure 3-31: move() Function, Top Half
Figure 3-32: move() Function Test

Chapter 4: Computers, Programs, & Algorithms

Figure 4-1: Typical Power Mac G4 System
Figure 4-2: System Unit
Figure 4-3: Main Logic Board Block Diagram
Figure 4-4: PowerPC G4 Processor
Figure 4-5: Motorola PowerPC 7400 Block Diagram
Figure 4-6: C++ Translation Phases
Figure 4-7: Processing Cycle
Figure 4-8: Memory Hierarchy
Figure 4-9: Simplified Memory Subsystem Diagram
Figure 4-10: Simplified Main Memory Diagram
Figure 4-11: CodeWarrior Code Generation Settings Window
Figure 4-12: Dumb Sort Results 1
Figure 4-13: Dumb Sort Results 2
Figure 4-14: Dumb Sort Results 3
Figure 4-15: Algorithmic Growth Rates

Chapter 5: Simple Programs

Figure 5.1: Selecting Std C++ Console Settings
Figure 5.2: PPC Std C++ Console Settings Dialog
Figure 5.3: Minimal_Program Project Window
Figure 5.4: Selecting Disassemble from the Project Menu
Figure 5-5: Results of Running Example 5.3
Figure 5-6: Integer Value of Character Literal ‘Help’
Figure 5-7: Parts of a Floating Point Literal
Figure 5-8: Left Shifting shift_val
Figure 5-9: Right Shifting shift_val
Figure 5-10: AND Truth Table
Figure 5-11: Exclusive OR Truth Table
Figure 5-12: Inclusive OR Truth Table
Figure 5-13: Conditional Operator Map
Figure 5-14: Assignment Operator Operands
Figure 5-15: Creating Local Scope Blocks with Braces

Chapter 6: Controlling The Flow Of Program Execution

Figure 6-1: if Statement Diagram
Figure 6-2: if-else Statement Diagram
Figure 6-3: switch Statement Diagram
Figure 6-4: while Statement Diagram
Figure 6-5: do Statement Diagram
Figure 6-6: for Statement Diagram
Figure 6-7: goto Statement Diagram

Chapter 7: Pointers and References

Droning Professor
Perplexed One
Fast Asleep!
C++ Man
Figure 7-1: Memory
Figure 7-2: Another Way To Represent Memory
Figure 7-3: Hexadecimal Addressing
Listing 7.1: Example 7.2 Disassembled
Figure 7-4: Running Example 7.2 with CodeWarrior
Figure 7-5: Running Example 7.2 Alone
Figure 7-6: Pointer
Figure 7-7: Contents of int_ptr
Figure 7-8: Running Example 7.5
Figure 7-9: Application Stack and Heap Relationship

Chapter 8: Arrays

Figure 8-1: Array of Four Integer Objects
Figure 8-2: Results of Running Example 8.5
Figure 8-3: Results of Running Example 8.6
Figure 8-4: Results of Running Example 8.7
Figure 8-5: Results of Running Example 8.8
Figure 8-6: Array of Integer Pointers and Dynamically Created Integer Objects in Heap Memory
Figure 8-7: Single-Dimensional Array Representation and Declaration
Figure 8-8: Two-Dimensional Array and Declaration
Figure 8-9: Two-Dimension Array Memory Representation
Figure 8-10: Visual Representation of a Three Dimensional Array
Figure 8-11: Visual Representation of a Four-Dimensional Array
Figure 8-12: three_d_int_array Initialized to Zeros
Figure 8-13: All Rows of First Sheet Initialized
Figure 8-14: First Row of Each Sheet Initialized
Figure 8-15: Relationship of Declaration Braces to Array Elements for three_d_int_array
Figure 8-16: Results of Initialization Shown In Example 8.14
Figure 8-17: Dynamic Array of Three Integer Pointers
Figure 8-18: Results of Running Example 8.17 Using Row Value 6
Figure 8-19: Results of Running Example 8.19 Using rows = 10 & cols = 6

Chapter 9: Functions

Figure 9-1: TestFunctionOne Project Screen Shot
Figure 9-2: Results of Calling testFunctionOne()
Figure 9-3: Results of Calling testFunctionTwo() Five Times with Static Variable
Figure 9-4: Results of Calling testFunctionThree() with an Argument Value of 5
Figure 9-5: Function Activation Record Sequence
Figure 9-6: Partial Disassembly of main.cpp
Figure 9-7: Partial Disassembly of testFunctionThree.cpp
Figure 9-8: Results of Running testFunctionFour Program
Figure 9-9: Results of Running addressCopyTest Program
Figure 9-10: Results of Running testFunctionFive Program
Figure 9.11: Results of Running testFunctionSix Program
Figure 9-12: Results of Running Example 9.28
Figure 9-13: Results of Calling Overloaded Function functionA()
Figure 9-14: Results of Running the Simple Recurse Program
Figure 9-15: Results of Running the QuickSort Program
Figure 9-16: Results of Calling DumbSort() Using compareAscending() and compareDescending() CallBack Functions
Figure 9-17: Creating an Empty Project in CodeWarrior
Figure 9-18: dumpsort.cpp Added to the Empty Project
Figure 9-19: Setting Library Target Settings
Figure 9-20: Selecting Project Type and Library Name
Figure 9-21: Using the dumbsort Library

Chapter 10: Toward Problem Abstraction—Creating New Data Types

Figure 10-1: Example 10.9 Output
Figure 10-2: C++ Language Settings: Set Enums Always int
Figure 10-3: Format of Structure Function Definition

Chapter 11: Dissecting Classes

Figure 11-1: UML Representation for the Class ClassName
Figure 11-2: UML Class Diagram of a Simple Navy Fleet Simulation Application
Figure 11-3: Results of Running Example 11.4
Figure 11-4: Results of Running Example 11.7
Figure 11-5: Results of Running Example 11.10
Figure 11-6: Results of Running Example 10.10 Again
Figure 11-7: Results of Running Example 11.15
Figure 11-8: Horizontal Access
Figure 11.9: Results of Running Example 11.18
Figure 11-10: Person Class Diagram

Chapter 12: Compositional Design

Figure 12-1: Results of Running Example 12.5
Figure 12-2: Results of Running Example 12.5 Again
Figure 12-3: UML Diagram Illustrating Simple Aggregation
Figure 12-4: UML Sequence Diagram Illustrating Message Passing Between Objects
Figure 12-5: Engine Composite Aggregation Class Diagram
Figure 12-6: FuelPump Class
Figure 12-7: Engine Class Diagram
Figure 12-8: Results of Running Example 12-16

Chapter 13: Extending Class Functionality Through Inheritance

Figure 13-1: UML Class Diagram Showing Generalization
Figure 13-2: Results of Running Example 13.5
Figure 13-3: Effects of Using Different Inheritance Specifiers
Figure 13-4: Public, Protected, & Private Inheritance
Figure 13-5: Public Inheritance from a Horizontal Access Perspective
Figure 13-6: Person/Student Class Diagram
Figure 13-7: Results of Running Example 13.9
Figure 13-8: Foo and DerivedFoo Class Diagram
Figure 13-9: Results of Running Example 13.14
Figure 13-10: Results of Running Example 13.14 After Modifying foo.cpp
Figure 13-11: Results of Running Example 13.14 After Removing the virtual Keyword from Foo Class Destructor Declaration
Figure 13-12: Fleet Simulation Class Diagram
Figure 13-13: Results of Running Example 13.20
Figure 13-14: Payroll Application Class Diagram
Figure 13-15: Results of Running Example 13.28
Figure 13-16: Class Diagram Showing Common Base Class Inheritance
Figure 13-17: Non-Virtual Inheritance Will Result in Multiple Instances of Base Classes
Figure 13-18: Results of Running Example 13.33.
Figure 13-19: Results of Running 13.33 Showing Effects of Virtual Inheritance
Figure 13-20: Virtual Inheritance Results in One Instance of A

Chapter 14: Ad Hoc Polymorphism—Operator Overloading

Figure 14-1: I/O Stream Class Hierarchy
Figure 14-2: Results of Running Example 14.3
Figure 14-3: Results of Running Example 14.5
Figure 14-4a: Before Shallow Copy of Complex Objects
Figure 14-4b: After Shallow Copy of Complex Objects
Figure 14-5: Results of Running Example 14.9
Figure 14-6: Results of Running Example 14.12
Figure 14-7: Results of Running Example 14.15
Figure 14-8: Results of Running Example 14.18
Figure 14-9: Results of Running Example 14.21
Figure 14-10: Results of Running Example 14.24
Figure 14-11: Results of Running Example 14.27
Figure 14-12: Results of Running Example 14.32

Chapter 15: Static Polymorphism—Templates

Figure 15-1: Placeholder Use In Mail Merge
Figure 15-2: Results of Running Example 15.2
Figure 15-3: Error Resulting from Calling Sum() with Two Different Type Arguments
Figure 15-4: Results of Running Example 15.4
Figure 15-5: Results of Running Example 15.5
Figure 15-6: Results of Running Example 15.9
Figure 15-7: Results of Running Example 15.11
Figure 15-8: Results of Running Example 15.13
Figure 15-9: Results of Running Example 15.14
Figure 15-10: Results of Running Example 15.15
Figure 15-11: Results of Running Example 15.16

Chapter 16: Dynamic Polymorphism—Object-Oriented Programming

Figure 16-1: Base Class Declares Behavior Shared By All Derived Class Objects
Figure 16-2: Class Diagram Showing Three-Level Inheritance Hierarchy
Figure 16-3: Results of Running Example 16.4
Figure 16-4: Original Aircraft Engine Components Model
Figure 16-5: UML Class Diagram Showing Polymorphic Engine Components
Figure 16-6: Results of Running Polymorphic Engine Program

Chapter 17: Well-Behaved Objects—The Orthodox Canonical Class Form

Figure 17-1: Results of Running Example 17.3
Figure 17-2: Results of Running Example 17.9

Chapter 18: Mixed Language Programming

Figure 18-1: Creating a New Empty Project Named Square_Lib in CodeWarrior
Figure 18-2: Empty Project Window
Figure 18-3: Select Add Files... from the Project Menu
Figure 18-4: Select square.c to Add it to the Project
Figure 18-5: Project Window After Adding square.c
Figure 18-6: Select Square_Lib Settings...from the Edit Menu
Figure 18-7: Settings Window with Target Settings Selected
Figure 18-8: Setting Project Type and Library File Name
Figure 18-9: Ensure the Activate C++ Compiler Check Box is Not Checked
Figure 18-10: Select Make from the Project Menu to Create the square.lib File
Figure 18-11: C++ Project Window with square.lib Library File Added.
Figure 18-12: Link Error Resulting from First Attempt to Build the C++ Project that Uses a C Function
Figure 18-13: Results of Running the C++ Project Using the C square() Function
Figure 18-14: Win32 Project Using Inline Assembly Language
Figure 18-15: Results of Running the Inline Assembly Project
Figure 18-16: Adding Assembly Object File to C++ Project
Figure 18-17: Assembling double.asm with MASM ver. 6.14
Figure 18-18: Win32 Project Using dv.obj
Figure 18-19: Results of Running Macintosh Version of doubleVal()
Figure 18-20: Steps to Create a Java Native Interface (JNI) Program
Figure 18-21: Compiling SayHi.java
Figure 18-22: Compiling SayHi.java Results in SayHi.class
Figure 18-23: Using javah to Create the SayHi.h Header File
Figure 18-24: Results of Creating SayHi.h Using javah Command Line Tool
Figure 18-25: Blank CodeWarrior Project
Figure 18-26: sayhi.cpp Added to Blank Project
Figure 18-27: Blank Project Window Showing Added Library Files
Figure 18-28: Target Settings Widow
Figure 18-29: Directory Listing Showing SayHi.dll
Figure 18-30: Results of Running the SayHi Java Application
Figure 18-31: Compiling sayhi.cpp Using g++ to Generate an OSX Dynamic Link Library
Figure 18-32: Directory Listing Showing libSayHi.jnilib File
Figure 18-33: Results of Running SayHi Java Program in an OSX Terminal Window

Chapter 19: Three Design Principles

Figure 19-1: Results of Running Example 19.3
Figure 19-2: Results of Running Example 19.4
Figure 19-3: Results of Running Example 19.7
Figure 19-4: Results of Running Example 19.13
Figure 19-5: Inheritance Hierarchy Showing Weaker and Stronger Types
Figure 19-6: Results of Running Example 19.14
Figure 19-7: Results of Running Example 19.14 with Modified C Class Function
Figure 19-8: Results of Running Example 19.14 Using Private C::f() Overriding Function
Figure 19-9: Fleet Simulation Model Class Diagram
Figure 19-10: Procedure-Oriented Software Module Hierarchy

Chapter 20: Using A UML Modeling Tool

Figure 20-1: Describe User Modes
Figure 20-2: Robot Rat Project Specification
Figure 20-3: Creating the New RobotRat System
Figure 20-4: Adding a New Diagram
Figure 20-5: Creating Use Case Diagram
Figure 20-6: User Perspective Use Cases
Figure 20-7: Adding Documentation via the Properties Editor Window
Figure 20-8: Linking to External Documentation via the Properties Editor Window
Figure 20-9: Completed Robot Rat User’s Perspective Use Case Diagram
Figure 20-10: Programmer Perspective Use Cases
Figure 20-11: Partial Application Architecture Use Case Diagram
Figure 20-12: Overall Robot Rat Application Package Architecture
Figure 20-13: Class Diagram Showing Remote Controlled Object Package Classes
Figure 20-14: Properties Editor for AbstractPosition Class
Figure 20-15: Properties Editor Window for the AbstractPosition Operation
Figure 20-16: Properties Editor Window for the setRow() Function
Figure 20-17: Adding Operation Parameters Using the Properties Editor Window
Figure 20-18: Completed and Annotated Overall Class Diagram
Figure 20-19: Start of Sequence Diagram for Robot Rat Application Launch
Figure 20-20: Editing Controller() Message Properties
Figure 20-21: Completed Robot Rat Application Launch Sequence
Figure 20-22: Create New RobotRat Sequence Diagram
Figure 20-23: First Step to Generating Code: Select Class Diagrams
Figure 20-24: Generate Code Menu Item
Figure 20-25: Code Generation Dialog
Figure 20-26: Reverse Engineering Dialog
Figure 20-27: Step 2 in the Reverse Engineering Process: Naming the New System and Setting Various System Properties
Figure 20-28: REProgress Window
Figure 20-29: Merge System Dialog
Figure 20-30: Associating Diagram Object with System Diagrams
Figure 20-31: Navigating to Linked Diagram
Figure 20-32: Web Viewer Wizard
Figure 20-33: Selecting System for Web Report Generation
Figure 20-34: Main Screen – RobotRat Project Web View



 < Day Day Up > 



C++ for Artists. The Art, Philosophy, and Science of Object-Oriented Programming
C++ For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504028
EAN: 2147483647
Year: 2003
Pages: 340
Authors: Rick Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net