CIS 067 Section 1
A First Course in Problem Solving, Abstraction and Design using C++
Course Syllabus

Fall, 2001

Frank Friedman
Wachman Hall 302

I. Prerequisite Skills:

Math 74 with a grade of C or better or two years of high school algebra and one year of trigonometry. This is the first required course for CIS majors at Temple. It assumes some prior programming background in a high-level programming language equivalent to a one year course in high school or a one semester college course in FORTRAN, C, or Pascal. It is a fast paced course and should not be taken by students having no programming background. Students with no background are encouraged to take CIS C071 before taking this course.

What This Course Is Not: This course is not intended as a general introduction to computing or as a computing tools introduction. You might wish to consider CIS C055 if your interests lie in these areas. If you have not taken a programming couirse, you may wish to take CIS C071 before embarking on this couse.

II. Catalog Description:

An introduction to programming methods, software engineering, and procedural and data abstraction. Topics include top-down design and modular programming, the software development process, component documentation, including preconditions and postconditions, debugging and testing programs.

Data types covered include simple types, arrays, and structs, system-defined types such as streams and strings, and a handful of user-defined types such as money, and geometric shapes. An introduction to file processing in C++, simple searching and sorting, and an introduction to abstract data types, the C++ class, and C++ templates. Several modest sized programs using completed class components may also be examined.

III. Course Objectives:

Students will be expected to develop problem solving skills and strategies for analyzing a problem statement, designing and programming (in C++) a solution to the stated problem, and documenting and testing the solution. Simple tools such as the Data Requirements Table, Program Structure Chart, and algorithmic Pseudo-code will be relied on heavily to aid in this process. Appropriate use of these tools will be as important as the finished product itself. Emphasis will be placed on the identification and modeling of problem domain data elements essential to a problem solution and the step-wise refinement of algorithms that manipulate this data.

Students will study examples of programs developed in this manner and develop their own small to medium size programs.

The principle programming language of implementation is C++. For the most part, C++ will be introduced by example. Programs involving the use of data structures and algorithms and emphasizing software design approaches using abstract data types and object-oriented paradigms will be required. One group project will be assigned.

By the end of the course, you should be able to understand and practice an appropriate software development methodology including the following:

  1. Given the statement of a problem in English, identify the input and output data requirements and other data needed for the problem solution and document the representations chosen for this data using the Data Requirements Table.
  2. Decompose a larger problem into smaller subproblems, design a set of program components for solving these subproblems, structure a solution to the main problem in terms of these components, and document the component structure using a Structure Chart.
  3. Outline the algorithms for the more complex components of a program and document these outlines using Pseudo-code.
  4. Use the information in the Data Requirements Table, the Structure Chart, and the Pseudo-code to implement and test a program using a C++ development environment.

IV. Texts:

Friedman and Koffman, Problem Solving, Abstraction and Design using C++ (third edition), Addison-Wesley.

V. Other Reading:

Savitch: Problem Solving with C++ (second edition), Addison-Wesley.
Deitel and Deitel, C++ How to Program, Prentice Hall.
Material that may be found under www.cis.temple.edu/~ingargio/

Other information including programming assignments and computer user documentation distributed in class or located on the World Wide Web (or both).

VI. Course Outline and Reading Summary

PART I

A. Introduction to Computers, Programming,  and Software Construction (1 week)

  1. Course orientation -- emphasis on modeling of problem domain space
  2. Computer history, overview of hardware, overview of software, translating and linking a program, introduction to the operating system and to the program development environment you will use
  3. Using the computer -- learning the system
  4. Problem solving and software engineering – a brief introduction
  5. Origins of C++
  6. Development of a sample program
  7. Testing and Debugging.
  8. English as a [pseudo] programming language.

    Assigned Reading:
    Friedman/Koffman: Preface, Chapter 1; Appendixes A through D (look over).
    Other reading as assigned (related to the computer system to be used)

    Exercises and Programming Problems:
    Assignment Number 1: Computing Facilities and Software Tools – Using Simple Functions to Display Letters

B. An Introduction to C++ (2 weeks)

  1. Language Standards
  2. Applying the Software Development Method - a problem solving / software development methodology – algorithms; software life cycle.
  3. The Fundamental Elements of C++
  4. Overview of C++, declaration part of a program, executable part
  5. Abstraction -- data types as models of real things (and their shortcomings)
  6. Object-Oriented Programming – Classes and Objects
  7. Executable Statements
  8. Characters and Strings
  9. Interactive Mode, Batch Mode, Data Files

C. Procedural Abstraction - Introduction to Functions (1.5 weeks)

  1. Top-down design and modularizing a program, structure charts, built-in functions
  2. Functions as program building blocks
  3. Parameter passing: by value, by reference, by address
  4. Mode of parameters: in, out, in out.
  5. Scope of variables.
  6. Function overloading.

    Assigned Reading:
    Friedman/Koffman, Chapters 3 (except 3.7) and 6 (except 6.7).

    Exercises and Programming Problems:
    Assignment Number 3: A simple hand-held calculator
    Assignment Number 4: (A Game for Children – Fraction Arithmetic)

FIRST EXAM (0.5 weeks)

PART II

D. I/O Streams and Files (2 weeks)

  1. Streams and External files
  2. Character and String I/O
  3. Manipulators for Formatting
  4. Streams as Arguments to Functions
  5. The Relationships Among Stream Data Types

    Assigned Reading:
    Friedman/Koffman, Chapter 8.

    Exercises and Programming Problems:
    Assignment Number 5: Banking Problem (I/O and Computation)

E. Arrays -- Searching and Sorting (1.5 weeks)

  1. Declaring and referencing arrays.
  2. Arrays and functions.
  3. I/O with Arrays
  4. Searching and Sorting Arrays
  5. Structs
  6. I/O with arrays and structs

    Assigned Reading:
    Friedman/Koffman, Chapter 9

    Exercises and Programming Problems:
    Assignment Number 6: Bank Problem - this time with with Arrays and Structs (requiring the computation of a median value)

SECOND EXAM (0.5 weeks)

PART III

F. Defining Classes – An Introduction (2 weeks)

  1. Classes and member functions.
  2. Private and public parts.
  3. Constructors.
  4. Overloading operators.

    Assigned Reading:
    Friedman/Koffman, Chapters 10 and 11.

    Exercises and Programming Problems:
    Assignment Number 7: The Fractions Problem using Classes OR The Dice Simulation Problem (using arrays and Classes)
    Assignment Number 8: The Dice Simulation Problem (using Constructors with Dynamically Allocated Arrays)

G. Recursion (1 week)

Assigned Reading:
Friedman/Koffman, Chapter 6, Section 7.

Exercises and Programming Problems:
Assignment Number 9: Factorial Problem - Revision for Tracing Execution

H. Modeling Data with Arrays, Structs and Classes (2 weeks)

  1. Multidimensional Arrays
  2. Template Classes
  3. The Indexed List ADT
  4. Class Friends and Operator Overloading
  5. A Stack Template Class

    Assigned Reading:
    Friedman/Koffman, Chapter 12 (except 12.6).

    Exercises and Programming Problems:
    Assignment Number 10: (to be determined)

I. Pointers, Dynamic Memory, and Linked structures (1 week)

  1. Pointers
  2. Dynamic storage allocation
  3. Introduction to lists and trees.

    Assigned Reading:
    Friedman/Koffman, Chapter 14 (Sections 14.1 – 14.6)

    Exercises and Programming Problems:
    Assignment Number 11: (to be determined)

FINAL EXAM