Problem Solving with C++, Walter Savitch

Lab Manual


 
Labs by Rahman Tashakkori, Ph.D.,  Appalachian State University
Boone, NC 28608

 
 
Lab
Title
Lab 1 Introduction to computers and C++ programming
         Pre_lab
         Activity 1.1 - Introduction
         Activity 1.2 - Program Design Process
         Activity 1.3 - A Simple C++ Program
         Post_lab
Lab 2 C++ basics
         Pre_lab
         Activity 2.1 - Variables and Assignments
         Activity 2.2 - Simple Flow of Control. if Statement. if ... else Statement
         Activity 2.3 - Simple Flow of Control. while ... loop Statement. do ... while Statement 
         Activity 2.4 - Simple Flow of Control. Conditional while and do ... while loops 
         Post_lab - Solving Quadratic Equation
Lab 3 Procedural abstraction and functions that return a value
         Pre_lab
         Activity 3.1 - Predefined Functions
         Activity 3.2 - Type Casting
         Activity 3.3 - Functions that return a value. Procedural Abstraction
         Activity 3.4 - Function Overloading
         Post_lab
Lab 4 Functions for all subtasks
         Pre_lab
         Activity 4.1 - Void Functions
         Activity 4.2 - Functions that return more than one value. Call_by_reference
         Activity 4.3 - Function calling another function
         Activity 4.4 - A Program with Several Functions. Testing and Debugging Functions 
                                                               - Stubs and Drivers
         Post_lab - Complete the draw program 
Lab 5 I/O streams as an introduction to objects and classes
         Pre_lab
         Activity 5.1 - Reading from/Writing to a File. Using Streams for Program I/O
         Activity 5.2 - Streams as Arguments to Functions
         Activity 5.3 - Reading to the End of a File. Member Functions get and put. Member Function eof
         Activity 5.4 - Predefined Character Functions in cctype (ctype)
         Post_lab - A simple html converter
Lab 6 Defining classes
         Pre_lab
         Activity 6.1 - Structures
         Activity 6.2 - Classes
         Activity 6.3 - Constructs
         Post_lab - Rational number operator
Lab 7 More flow of control
         Pre_lab
         Activity 7.1 - Boolean Expressions
         Activity 7.2 - if ... else if ... else and switch statements
         Activity 7.3 - for statement
         Activity 7.4 - Blocks and scope of a variable in a block
         Post_lab - A Calendar
Lab 8 Friends and overloading operators
         Pre_lab
         Activity 8.1 - Friend Functions
         Activity 8.2 - Overloading Operators
         Activity 8.3 - Overloading << and >> 
         Activity 8.4 - A Class Inside Another Class
         Post_lab - Rational Class with overloading
Lab 9 Separate compilation and name spaces
         Pre_lab
         Activity 9.1 - Separate Compilation
         Activity 9.2 - Namespaces and Using Directives
         Activity 9.3 - Placing a Class in a Namespace
         Post_lab
Lab 10 Arrays
         Pre_lab 
         Activity 10.1 - Introduction to Arrays
         Activity 10.2 - Arrays in Functions
         Activity 10.3 - Arrays as Class Members. Array of Objects
         Activity 10.4 - Two Dimensional Arrays
         Post_lab - Rational Class with Overloading
Lab 11 Strings and vectors
         Pre_lab
         Activity 11.1 - Introduction to Strings, C-String Functions
         Activity 11.2 - The Standard String Class
         Activity 11.3 - Converting Between String Objects and C-String (Example: file I/O)
         Activity 11.4 - Vectors
         Post_lab - Student Database
Lab 12 Pointers and dynamic arrays
         Pre_lab
         Activity 12.1 - Introduction to pointers
         Activity 12.2 - Dynamic arrays
         Activity 12.3 - Destructors and copy constructors
         Post_lab
Lab 13 Recursion
         Pre_lab
         Activity 13.1 - Introduction to Recursion
         Activity 13.2 - Stacks for Recursion
         Activity 13.3 - Recursion Versus Iteration
         Activity 13.4 - Binary Search Using Recursion
         Post_lab - Reverse order an Integer
Lab 14 Templates
         Pre_lab
         Activity 14.1 - Introduction to Templates. Templates for Functions
         Activity 14.2 - Templates for Classes
         Post_lab 
Lab 15 Pointers and linked lists
         Pre_lab 
         Activity 15.1 - Introduction to pointers and Linked Lists
         Activity 15.2 - Searching a Linked List
         Activity 15.3 - Inserting a Node in the Middle of a Linked List 
                                Deleting a Node from the Middle of a Linked List
         Activity 15.4 - Stacks Using Linked Lists
         Post_lab
Lab 16 Inheritance
         Pre_lab
         Activity 16.1 - Introduction to Inheritance
         Activity 16.2 - Some Details in using Inheritance
         Activity 16.3 - Polymorphism
         Post_lab
Lab 17 Exception Handling
         Pre_lab
         Activity 17.1 - Exception Handling Basics in C++
         Activity 17.2 - Defining Your Own Exception Classes. Multiple Exceptions
         Activity 17.3 - Throwing an Exception in a Function
         Activity 17.4 - Throwing an Exception in a Function
         Post_lab
Acknowledgements: Monica Verma and Scott A. Barlowe computer science graduate students at
Appalachian State University, Boone, NC for testing and editing the labs