CSCI 1380 Computer Science I

News and Upcoming Dates

12/8/2009 (Tue): Homework assignment #3 due
12/10/2009 (Thu): Final review session, normal class location/time

Course Info

Fall 2009, Section 2
Tue, 5:45pm - 7:00pm, ENGR 1.290 (lecture)
Thu, 5:45pm - 7:00pm, ACAS 2.120 (lab)

Syllabus and Web Site

Students are expected to be familiar with all the information on the course syllabus. Changes will be announced in class and posted on the this web site. All course materials will be made available here.

Syllabus (.doc)

Textbook

Malik, D.S., C++ Programming: Program Design Including Data Structures, Fourth Edition, ISBN: 1-4239-0222-X

Policies and Syllabus Changes

New teamwork policy for labs and homework assignments.

Weekly exercises will now be made available for review and exam prep. They are due in class the following Tuesday and will count towards your in-class exercises score.


Homework Assignments

Review Exercises

  1. Conditions, due in class 10/27 (Conditions solutions)
  2. Loops, due in class 11/3 (Loops solutions)
  3. Functions, due in class 11/10 (Functions solutions)
  4. More functions, due in class 11/17 (Functions solutions)
  5. Arrays, due in class 11/24 (Arrays solutions)
  6. Structs, due in class 12/8 (Structs solutions)
  7. Extra exercises, functions, not due (Extra functions solutions)
  8. Extra exercises, arrays, not due (Extra arrays solutions)

Contact

Emmett Tomai
Office: ENGR 3.287
Phone: 292-7229
Email: etomai at cs dot panam dot edu

Office hours: Tue, Thu 10:30-11:30am, Wed 1:00-3:00pm or by appointment

Graduate teaching assistant

Andrey Kashlev
andrey.kashlev at gmail dot com
Office hours: Mon 2:00-6:00pm
Location: ENGR 3.273

Course Calendar

TuesdayThursday
Sep 1 Introduction to Computer Programming

Course syllabus, programmable hardware and software, binary data, high and low level programming languages, writing and running a C++ program, the programming process (Loosely following textbook chapter 1)


slides (.ppt)
Sep 3 Writing and Running a C++ Program

Textbook chapter 2 topics:

  • The Basics of a C++ Program
  • Preprocessor Directives
Misc topics:
  • Comments


slides (.ppt)

Homework assignment 0 due

Sep 8 Data, Expressions and Variables

Textbook chapter 2 topics:

  • Data Types
  • Arithmetic Operators and Operator Precedence
  • Expressions
  • Input
  • Increment and Decrement Operators (partial)
  • Output


slides (.ppt)
Sep 10 Lab 2

Textbook chapter 2 topics:

  • Data Types (review and more details)
  • The string Type
  • Input (review)


slides (.ppt)

1380-lab2.pdf

Sep 15 Input and Output (I/O)

Textbook chapter 3 topics:

  • I/O Streams and Standard I/O Devices
  • Using Predefined Functions in a Program
  • Input Failure
  • Input/Output and the string type


slides (.ppt)
Sep 17 Lab 3

Textbook chapter 2 topics:

  • Program Style and Form (review)
  • Allocating Memory with Constants and Variables (about constants)


slides (.ppt)

1380-lab3.pdf

Sep 22 Input Review and Output Formatting

Textbook chapter 3 topics:

  • I/O Streams and Standard I/O Devices (review)
  • Output and Formatting Output
  • Additional Output Formatting Tools
  • File I/O


slides (.ppt)

Example Program (length conversion)

Sep 24 Lab 4

slides (.ppt)

1380-lab4.pdf

Sep 29 Control Structures I

Textbook chapter 4 topics:

  • Control Structures
  • Relational Operators
  • Selection: if and if...else


slides (.ppt)

Homework assignment 1 due

Oct 1 Lab 5

slides (.ppt)

1380-lab5.pdf

Example Program (favorite character)

Oct 6 Control Structures I

Textbook chapter 4 topics:

  • Logical (boolean) Operators and (complex) Logical Expressions
  • switch Structures


slides (.ppt)
Oct 8 Lab 6

slides (.ppt)

1380-lab6.pdf

Complex conditions examples

Oct 13 Midterm Review

slides (.ppt)

Review Handout (list of things you might have to do on the midterm)

Input example

Input example text file

File I/O example

Using math functions example

Oct 15 Midterm Exam
  • Normal class time and location (not in the lab!)
  • Covering book chapters 1-4
  • Closed book
Oct 20 Midterm Recap, Course Evaluation, Loops

slides (.ppt)

Midterm solutions

Oct 22 Lab 7 (conditions)

slides (.ppt)

1380-lab7.html

Homework assignment 2, due 11/10

Review exercises 1 (conditions) due 10/27

Oct 27 While and for loops

Textbook chapter 5 topics:

  • while Looping (Repetition) Structure
  • Designing while Loops
  • for Looping (Repetition) Structure
  • do...while Looping (Repetition) Structure
  • Choosing the Right Looping Structure
  • break and continue Statements
  • Nested Control Structures

slides (.ppt)

Review exercises 1 (conditions) solutions

In-class examples:

Oct 29 Lab 8 (loops)

slides (.ppt)

lab8.html

Review exercises 2 (loops)

Nov 3 User-defined Functions

Textbook chapter 6 topics:

  • Predefined functions
  • User-defined functions
  • Value-returning functions


slides (.ppt)

In-class examples:

Review exercises 2 (loops) solutions

Nov 5 Lab 9 (functions)

slides (.ppt)

lab9.html

Review exercises 3 (functions)

Nov 10 Functions, value and reference parameters

Textbook chapter 6 topics:

  • User-defined functions (review)
  • Value-returning functions (review)

Textbook chapter 7 topics:

  • void Functions
  • Value Parameters
  • Reference Variables as Parameters
  • Value and Reference Parameters and Memory Allocation
  • Reference Parameters and Value-Returning Functions
  • Scope of an Identifier


slides (.ppt)

In-class examples are in the slides

Homework assignment 2 due

Review exercises 3 (functions) solutions

Nov 12 Lab 10 (functions, value and reference parameters)

lab10.html

Review exercises 4 (more functions)

Nov 17 Arrays

Textbook chapter 9 topics:

  • Arrays


slides (.ppt)

In-class examples:

Review exercises 4 (more functions) solutions

Nov 19 Lab 11 (arrays)

lab11.html

Review exercises 5 (arrays)

Nov 24 More arrays

Textbook chapter 9 topics:

  • Arrays


slides (.ppt)

In-class examples:

Review exercises 5 (arrays) solutions

Homework assignment 3, due 12/8

Nov 26 Thanksgiving
Dec 1 Structured data

Textbook chapter 10 topics:

  • Records (structs)


slides (.ppt)

In-class examples:

Dec 3 Lab 12 (structs)

lab12.html

Review exercises 6 (structs)

Dec 8 Naming memory with variables: primitive, struct or array?

slides (.ppt)

In-class examples:

Homework assignment 3 due

Review exercises 6 (structs) solutions

Dec 10 Study Days

Optional review session for the final at normal place/time

To participate in the review session, you must turn in at least 6 of the 9 available weekend review exercise sheets by this day. You can turn them in by hand or email them.

Dec 15 Final Exam 5:45-7:30pm
Dec 17 Finals Week

Lab Materials

How to use Microsoft Visual C++

Lab # Files Topics Introduced Due Date Sample Program
2 1380-lab2.pdf Variables, arithmetic and I/O (input/output) Thu 9/10/2009 Tue 9/15/2009  
3 1380-lab3.pdf More on variables, arithmetic and I/O Thu 9/10/2009 Tue 9/22/2009  
4 1380-lab4.pdf Output formatting and File I/O Thu 9/17/2009 Tue 9/29/2009 1380-lab4a.exe
5 1380-lab5.pdf Making decisions Thu 10/01/2009 Tue 10/06/2009  
6 1380-lab6.pdf Making more complex decisions Thu 10/08/2009 Tue 10/13/2009  
7 1380-lab7.html Complex conditions(new lab format) Thu 10/22/2009 Tue 10/27/2009  
8 lab8.html Loops Thu 10/29/2009 Tue 11/03/2009
9 lab9.html Functions Thu 11/05/2009 Tue 11/10/2009  
10 lab10.html Functions, value and reference parameters Thu 11/12/2009 Tue 11/17/2009  
11 lab11.html Arrays Thu 11/19/2009 Tue 11/24/2009  
12 lab12.html Structs Thu 12/3/2009 Tue 12/8/2009