CS 0007 - Introduction to Computer Programming

Summer Term: 04-3

 

 

Class

Recitation

Time:

12:30 – 2:15

2:25-3:15

Days:

TH

T

Room:

5502 Sennott Square

5505 Sennott Square

Webpage:

http://www.cs.pitt.edu/~jmisurda/teaching/cs0007.htm

 

Note:  You must sign up for the recitation.

 

Contact Information

 

Instructor: Jonathan Misurda

 

TA: Rasoul Firoz

Office:

6404 Sennot Square

Office:

6150 Sennott Square

Phone:

(412) 624-9129

Phone:

(412) 624-8464

Email:

jmisurda@cs.pitt.edu

Email:

raf35@cs.pitt.edu

Office Hours:

Tu Th: 10:30-12:30

Fr: 1:00-3:00

Office Hours:

Mo We: 2:30-3:30

 

Description

 

Computers have become increasingly pervasive in today’s society.  Their power to do complicated and repetitive tasks quickly and efficiently has made them invaluable tools in modern society.  In this class, you will learn to harness the power of a computer to do new tasks by creating your own software as opposed to using existing programs.  We will explore the limits of what a computer can and cannot do easily, and provide you with the knowledge and experience to recognize those problems that you may find in life that can be solved with the help of a computer, and the ability to make the computer do those tasks.

 

This class is meant as a first class in computer science.  Anyone is welcome to take it, as computers can be useful in a variety of fields.  It is also meant as an introduction to computer science for those students who wish to pursue the field further, but lack prior exposure to the material.

 

Prerequisites

 

There are no prerequisites. Concepts from basic Algebra will be drawn upon.  Passing familiarity with the operation of a computer is also helpful.

 

(If you are already proficient - had 1 or 2 courses prior - in computer programming this is not the course for you.)


Course Purposes and Goals

 

Introduction to Computer Programming is meant as a course to expose interested students how computer software is written and tested.  It seeks to illuminate the creative process that is computer programming from the ground up, with an emphasis on good preplanning and style.

 

In this course we will be writing procedural programs in the Java programming language.  Not only will you learn what that precisely means, but you will also, at the end of the term:

 

 

Textbook

 

The text is:

 

            Pohl, Ira and McDowell, Charlie. Java by Dissection. Addison-Wesley, 2000.

 

It can be found in the bookstore.

 

Class Policies

 

Exams: There will be three exams in this course, two midterms and a cumulative final. Since we have longer class periods, the first half-hour will be reserved for review/last minute questions.  Please come prepared with your questions, preferably ones other than “What’s on the test?” Exams will be returned to you within one week.

 

Cheating will not be tolerated.  Anyone caught cheating will be given a zero for the test.

 

Labs and Quizzes: Attending recitation is an important part of this course.  In recitation you will be able to work in a structured setting while completing small tasks (Labs). Concepts from class will be expanded upon and tested with unannounced quizzes.

 

Projects: There will be four out-of-class assignments given.  These are to be completed in the given time (no extensions will be given without a valid excuse.)  These are meant to be your own work, anyone found to be collaborating will be given a zero for the assignment.  Collaborating also means using code from previous terms, other universities, your friends, or finding it on Google.

 

Participation:  Attendance will not be taken, but in such a small class, any absence will be noticed.  Several unexcused missed classes will adversely affect your grade.


Grading

 

Your grade will be based upon 3 exams, 4 projects, 3 labs, 4 quizzes (the lowest one will be dropped), and participation:

 

3 Exams

51% (17% each)

4 Projects

32% (8% each)

3 Labs + 3 Quizzes

12%

Participation

5%

Total

100%

 

The scale for the term will be:

Percentage

Letter

97 or above

A+

93-96

A

90-92

A-

87-99

B+

83-86

B

80-82

B-

77-79

C+

73-76

C

70-72

C-

67-69

D+

63-66

D

60-62

D-

less than 60

F

 

Term Schedule: The daily topics are subject to change depending on our pace.  They are there to assist you in the readings so you can focus on those concepts prior to class.

 

Week 1 – (5/11 & 5/13)

Readings for this week: JBD 1

 

Tuesday

  • Project 1 Assigned
  • Introduction to the course
  • Introduction to computers and the internet
  • Using the lab and recitations

 

Thursday

  • Introduction to problem solving
  • First programs
  • Compiling and running programs
  • Applets vs. standalone programs

Week 2 – (5/18 & 5/20)

Readings for this week: JBD 2.1-2.8

 

Tuesday

  • Project 1 Due
  • Algorithms
  • Keywords, comments
  • Primitive types, identifiers, variables, expressions, operators,

 

Thursday

  • User input
  • Strings
  • Predefined methods

 

 

Week 3 – (5/25 & 5/27)

Readings for this week: JBD 2.9-2.14

 

Tuesday

  • Numeric types
  • Char
  • Arithmetic expressions
  • Type conversion
  • Assignment

 

Thursday

  • Project 2 Assigned
  • Increment/decrement
  • Operator precedence
  • Style

 

Week 4 – (6/1 & 6/3)

Readings for this week: JBD 3.1-3.3

 

Tuesday

  • Review
  • Exam 1 (Covers Chapters 1 and 2)

 

Thursday

  • More expressions
  • Blocks, empty statement,
  • Boolean expressions, relational operators, logical operators
  • Conditional statements

 

 

Week 5 – (6/8 & 6/10)

Readings for this week: 3.4-3.10

 

Tuesday

  • Advanced conditionals
  • Introduction to repetition
  • While, for
  • Break/continue, switch

 

Thursday

  • Problem-solving strategies
  • Style, more applets
  • text fields, labels

 

 

Week 6 – (6/15 & 6/17)

Readings for this week: 4.1 - 4.5

 

Tuesday

  • Project 2 Due
  • Introduction to methods & structured programming
  • Calling/defining methods
  • Return
  • Return types

 

Thursday

  • Project 3 Assigned
  • Static methods
  • Parameters
  • Scope
  • Top-down design

 

Week 7 – (6/22 & 6/24)

Readings for this week: 4.6 - 4.10

 

Tuesday

  • Random numbers
  • Details of parameter passing
  • Call-by-value

 

Thursday

  • More problem solving
  • Recursion

 

 

Week 8 – (6/29 & 7/1)

Readings for this week: 4.11 - 4.13

 

Tuesday

  • mathematical functions
  • overloading
  • style
  • javadoc
  • drawings in applets

 

Thursday

  • Review
  • Exam 2  (Covers Chapters 3 and 4)

 

Week 9 – (7/6 & 7/8)

Readings for this week: 5.1 - 5.6

 

Tuesday

  • Project 3 Due
  • Introduction to arrays: declaring, initializing, accessing, length
  • Passing to methods
  • Assignment

 

Thursday

  • Project 4 Assigned
  • Finding min/max
  • Searching
  • Simple sorting
  • Searching sorted arrays

 

Week 10 – (7/13 & 7/15)

Readings for this week: 5.7 - 5.12, 10.1 - 10.5

 

Tuesday

  • Big-oh notation
  • Boolean arrays, char arrays
  • 2-dimensional arrays initializing
  • arrays of nonprimitive types

 

Thursday

  • Introduction to files
  • Creating text files
  • Reading text files
  • Formatting text output

 

Week 11 – (7/20 & 7/22)

Readings for this week: 10.6 - 10.8, 8.1 - 8.3

 

Tuesday

  • Encrypting/decrypting text
  • Binary files
  • Detecting end-of-file

 

Thursday

  • Introduction to GUIs (Swing)
  • Buttons
  • Text/numerical input
  • Events

 

Week 12 – (7/27 & 7/29)

Readings for this week:  None

 

Tuesday

  • Project 4 Due
  • Drawing revisited
  • Components
  • Layout managers
  • Review for the final

 

Thursday

  • Final Exam (cumulative)