Programming with Visual C++: Concepts and Projects

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Visual, interactive, and engaging projects are the hallmark of this innovative book that marks a rapid departure from traditional computer science texts. Programming in Visual C++: Concepts and Projects uses a graphical user interface (GUI) approach instead of the traditional console (plan text) mode, to provide a thorough introduction to computer science and C++ concepts that is highly visual and enjoyable for the reader. Because Visual C++ no longer requires advanced skills to produce GUIs, even beginning readers are able to produce attractive and functional GUIs within the first few chapters. Coverage includes a comprehensive introduction to programming basics, including control and data structures, as well as object-oriented programming. Straightforward and easy to understand, this is a valuable resource for anyone interested in a computer science book that is as fun as it is informative.

Author(s): James Allert
Publisher: Course Technology
Year: 2008

Language: English
Pages: 739

Cover Page
Title Page
Copyright Page
Dedication
Brief Contents
Table of Contents
Preface
1 INTRODUCTION
Object-Oriented Programming
Hardware Fundamentals
History of Hardware Development
Software Fundamentals
History of Software Development
The Programming Process
Types of Errors
A Project Development Strategy
The Visual Studio IDE
Tutorial: ‘‘Hello World!’’ (1 Button Version)
Problem Analysis
Design
Development and Preliminary Testing
Understanding the Code
Testing the Completed Program
Debugging a Program
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
2 READING, PROCESSING, AND DISPLAYING DATA
Solving Problems
Data and Data Types
Variables
Initializing Variables
Data Input
The TryParse() Method
Arithmetic Operations
Operator Precedence in Arithmetic Expressions
Arithmetic Operators and Strings
Shorthand Assignment
The Math Library
Data Output
The ToString()Method
Tutorial: Addition Program
Problem Analysis
Design
Development
Testing
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
3 INTEGRAL DATA
The Binary Number System
Integral Data Types
Data Type Conversion
Explicit Type Conversion
Implicit Type Conversion
Integer Arithmetic
Integer Division
The Mod Operator (%)
Tutorial: Binary Conversion Program
Problem Analysis
Design
Development
Testing
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
4 SELECTION
Control Structures
Sequential Control Structures
Selection Control Structures
Relational Operators
Using if Statements to Provide a Single Alternative
Using if...else Statements to Provide Two Alternatives
Logical Operators
The not Operator (!)
The and Operator (&&)
Determining When to Use the and Operator (&&) and the or Operator (||)
The or Operator (||)
Nested Control Structures
Multiple Alternative Selection
switch Statements
Tutorial: Vacation Planner
Problem Analysis
Design
Development
On Your Own
Quick Review
Terms to Know
Exercises
Projects
5 REPETITION
User-Controlled Repetition
Accumulating a Sum and Counting
Instance Variables
Repetition Control Structures
The while Loop
do...while Loops
The for Loop
Common Loop Tasks
Formula Translation
Accumulating a Product
Building a String
Generating Random Numbers
Finding the Largest Value
Counting Specific Values
Nested Loops
Tutorial: Quality Control Production Log
Problem Analysis
Design
Development
Testing
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
6 METHODS
Methods
System-Defined Class Methods
The System::Math Class Library
System-Defined Instance Methods
Application Methods
Programmer-Defined Methods
Methods without Parameters or a Return Type
Methods with Value Parameters
Methods with Reference Parameters
Methods with a Return Value
Graphics Class Objects and Methods
The Use of Constants
Tutorial: Planetary Motion
Problem Analysis
Design
Development
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
7 ARRAYS
Arrays
Array Declaration and Initialization
Using Arrays
Arrays and Instance Methods
Passing a Single Element into a Method by Value
Passing a Single Element into a Method by Reference
Passing an Entire Array into a Method
Sequential Search
Sequential Search Example
Searching with a for Loop
Counting Comparisons
The Search Comparison Log
Parallel Arrays
Multidimensional Arrays
Tutorial: Classroom Seating
Problem Analysis
Design
Development
Testing
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
8 BINARY SEARCH
Searching a Sorted List
Binary Search Algorithm
Binary Search Example
Search Analysis
Direct Lookup
Sequential Search
Binary Search
Determining the Best Approach to Searching
Searching for Strings
The array Class
String Operations
Tutorial: Video Store Inventory
Problem Analysis
Design
Development
Testing
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
9 SORTING
Exchanging Data Values in an Array
Sorting Strategies
The Selection Sort
The Selection Sort’s Inner Loop: Locating the Smallest Unsorted Value
The Bubble Sort
The Bubble Sort’s Inner Loop: Exchanging Values in Adjacent Elements
The Insertion Sort
The Insertion Sort’s Inner Loop: Shifting Data Through Reassignment
Comparing Sorting Algorithms
Tutorial: Vertical Bar Chart
Problem Analysis
Design
Development
Testing
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
10 RECURSION
Factorial Numbers
Recursion
Recursion Versus Iteration
Creating Fractal Images
Computer-Generated Fractal Images
Drawing Lines with DrawLine()
The Recursive DrawBranch() Method
Tutorial: Generating a Fractal Image
Problem Analysis
Design
Development
Testing
Analysis
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
11 POINTERS
Introduction
Basic Pointer Concepts
Memory Cell Addresses
Creating Pointer Variables
Accessing Data Indirectly Through Pointers
Pointers and Methods
Pointer Return Types
Pointers and Arrays
Pointer Arithmetic
Deleting Pointers
Arrays of Pointers
Sorting With Pointers
The Swap() Method
Tutorial: Sorting with a Pointer Array
Problem Description
Design
Development
Testing
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
12 LINKED LISTS: THE Node CLASS
The List Data Structure
The Problem with Arrays
Linked Lists
Creating a Linked List
Inserting a Node
Deleting a Node
Efficiency
Class Definitions
The Node Class
Constructors
Destructors
Class Diagrams
Class Definition Files
Header Files
Implementation Files
Class Definition Files and Client Code
Using Node Objects
Instantiating Node Objects
Accessing Node Attributes
Accessing static Variables
Tutorial: Linked List
Problem Description
Design
Development
Testing
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
13 OBJECT-ORIENTED PROGRAMMING
OOP Example
The Frog Class Definition
Instantiation and Use
Initializing Constructors
Data Hiding
Accessor and Mutator Methods
Utility Methods
Complete Frog Class Definition
Client Code
Tutorial: Maze Program
Problem Analysis
Mouse Class Definition
The Cell Class Definition
Design
Development
Testing
On Your Own
Quick Review
Terms to Know
Exercises
Programming Exercises
Appendix A: Concepts and Features Covered in Each Chapter
Appendix B: Documentation and Reference Materials
Appendix C: Common Errors
Index