School of Arts and Sciences

College in High School Course Syllabus

Computer Science 0007
Introduction to Computer Programming
(3 Credits)

This is a first course in computer science programming. It is recommended for students intending to major in computer science who do not have the required background for CS 0401. The focus of this course is on problem analysis and the development of algorithms and computer programs in a modern high-level language.

Prerequisites: There are no formal prerequisites, but some familiarity with computers in general is assumed of all students.

Requirements and grading: Grading will be based on programming assignments and exams.

The required text for this course is Starting Out with Java 5: From Control Structures to Objects, by Tony Gaddis (Addison-Wesley, 2005). You may use any textbook as long as the material listed below is included in the book.

The following topics are from the course textbook used in the University of Pittsburgh CS 0007 course. Some detail for each topic also is included. Topic six should only be covered superficially, to prepare students for CS 0401, should they choose to continue with that course.

Introduction

  • Algorithms
  • Implementing algorithms in Java
  • Why Java?
  • The Web and GUIs

Program Fundamentals

  • Compiling and running Java
  • Lexical elements
  • Data types and variables
  • User input: From keyboard, command-line, file
  • Predefined methods
  • Number types
  • Arithmetic expressions
  • Assignment operators
  • Increment and decrement ops
  • Precedence and associativity

Statements and Control Flow

  • Kinds of statements
  • Boolean expressions
  • The if statement (and if-else)
  • The while statement
  • The for statement
  • Break and continue
  • The switch statement
  • Laws of Boolean algebra

Methods: Functional Abstraction

  • Method invocation
  • Static expressions
  • Scope of variables
  • Top-down design
  • Invocation and call-by-value
  • Recursion
  • Method overloading

Arrays

  • One-dimensional arrays
  • Passing arrays to methods
  • Array alignment
  • Finding min and max
  • Simple sorting
  • Searching an ordered array
  • Two-dimensional arrays
  • Arrays of nonprimitive types

Objects: Data Abstraction

  • String: using a standard class
  • StringBuffer
  • Elements of a simple class
  • Access public and private: data hiding
  • Constructor methods
  • Static fields and methods
  • Passing objects: reference types
  • Scope
  • Keyword final and constants
  • Arrays of objects
  • Object-oriented design

Reading and Writing Files

  • Reading and writing text files
  • Formatting and text output
  • Reading and writing binary files
  • Detecting end of input stream
Top