CSCI/CMPE 1370 Engineering Computer Science I

News and Upcoming Dates

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

Course Info

Fall 2009, Section 2
T-Th, 9:10am - 10:25am
ENGR 1.272

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 homework assignments.

There will be an additional exam on 11/3 covering loops and functions. Your score on this exam (out of 35) will replace your score on the final 3 questions from the midterm if it is an improvement.

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. Loops, due in class 10/27 (Loops solutions)
  2. Functions, due in class 11/3 (Functions solutions)
  3. Arrays, due in class 11/10 (Arrays solutions)
  4. Structs, due in class 11/17 (Structs solutions)
  5. Pointers, due in class 11/24 (Pointers solutions)
  6. Classes, due in class 12/8 (Classes solutions)
  7. Extra exercises, functions, not due (Extra functions solutions)
  8. Extra exercises, arrays, not due (Extra arrays solutions)
  9. Extra exercises, structs, not due (Extra structs 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 assistants

(responsible for 1170 lab sections)

Hari Krishan Vellalacheruva
hkvellalach at broncs dot utpa dot edu
Office hours: Mon 1:00pm to 4:00pm
Location: ENGR. 2.290

Srisha Surisetty
ssurisetty at broncs dot utpa dot edu
Office hours: Fri 9:00am to 1:00pm
Location: ENGR. 2.290

Swathi Vempali
svempali at broncs dot utpa dot edu
Office hours: Mon, Wed 9:00am to 12pm
Location: ENGR. 2.290

Course Calendar

TuesdayThursdayLabs
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 Data, Expressions and Variables

Textbook chapter 2 topics:

  • The Basics of a C++ Program
  • Data Types
  • Arithmetic Operators and Operator Precedence
  • Expressions
  • Type Conversion
  • Input
  • Increment and Decrement Operators (partial)
  • Output


slides (.ppt)
Sep 8 A Complete C++ Program, Predefined Functions

Misc topics:

  • Comments
  • Named Constants
Textbook chapter 2 topics:
  • Preprocessor Directives
  • Creating a C++ Program
  • Program Style and Form
  • The Basics of a C++ Program (review)
Textbook chapter 3 topics:
  • Predefined Functions (intro)


slides (.ppt)

Homework assignment 1, due 9/17

Sep 10 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
  • The string Type
  • Input/Output and the string type


slides (.ppt)
Sep 15 Advanced Input

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 Formatting Output and Using Files

Textbook chapter 3 topics:

  • Output and Formatting Output
  • Additional Output Formatting Tools
  • File I/O


slides (.ppt)

Homework assignment 1 due

Sep 22 Control Structures I

Textbook chapter 3 topics:

  • File I/O
Textbook chapter 4 topics:
  • Control Structures
  • Relational Operators
  • Selection: if and if...else


slides (.ppt)

Homework assignment 2, due 10/1

Sep 24 Control Structures I

Textbook chapter 4 topics:

  • Selection: if and if...else
  • Logical (boolean) Operators and Logical Expressions


slides (.ppt)

Sep 29 Control Structures I

Textbook chapter 4 topics:

  • Logical (boolean) Operators and Logical Expressions
  • switch
  • switch Structures
  • Terminating a Program with the assert Function


slides (.ppt)
Oct 1 Control Structures II

Textbook chapter 5 topics:

  • while Looping (Repetition) Structure
  • Designing while Loops


slides (.ppt)

Homework assignment 2 due

Oct 6 Control Structures II

Textbook chapter 5 topics:

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


slides (.ppt)

Homework assignment 3, due 10/15

In-class examples:

Oct 8 User-Defined Functions I

Textbook chapter 6 topics:

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


slides (.ppt)

Oct 13 User-Defined Functions II

Textbook chapter 6 topics:

  • User-defined functions
  • Value-returning functions
Textbook chapter 7 topics:
  • Value Parameters
  • Value and Reference Parameters and Memory Allocation
  • Scope of an Identifier
  • Global Variables, Named Constants and Side Effects


slides (.ppt)

In-class example:

Oct 15 Midterm Review

slides (.ppt)

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

Example: switch vs. if...else tree

Example: updating variables in a loop

Homework assignment 3 due.

11,12,13
Oct 20 Midterm Exam Oct 22 Midterm discussion, course review, more functions

slides (.ppt)

Midterm solutions

Homework assignment 3 solution added

Homework assignment 4, due 11/5

Review exercises 1 (loops), due 10/27

14,15,16
Oct 27 User-Defined Functions II

Textbook chapter 7 topics:

  • Reference Variables as Parameters
  • Value and Reference Parameters and Memory Allocation
  • Reference Parameters and Value-Returning Functions
  • Scope of an Identifier
  • Function Overloading: An Introduction
  • Functions with Default Parameters


slides (.ppt)

In-class examples:

Review exercises 1 (loops) solutions

Oct 29 Arrays

Textbook chapter 9 topics:

  • Arrays
  • Parallel Arrays


slides (.ppt)

In-class examples:

Review exercises 2 (functions), due 11/3

17,18,19
Nov 3 Mid-term retest on loops and functions

Advanced Arrays

Textbook chapter 9 topics:

  • Parallel Arrays
  • C-strings (Character Arrays)


slides (.ppt)

In-class examples:

Review exercises 2 (functions) solutions

Nov 5 Two-dimensional Arrays and Records (structs)

Textbook chapter 9 topics:

  • Two- and Multidimensional Arrays

Textbook chapter 10 topics:

  • Records (structs)


slides (.ppt)

Midterm retest solutions

In-class examples:

Homework 4 relevant examples:

Homework 4 due (extended to Tuesday the 10th)
  • 10% penalty by Tuesday
  • Normal late policy after that
  • Those who submitted something on time can resubmit with a 5% penalty until Tuesday

Review exercises 3 (arrays), due 11/10

20,21,22
Nov 10 Records (structs)

Textbook chapter 10 topics:

  • Records (structs)


slides (.ppt)

In-class examples:

Review exercises 3 (arrays) solutions

Homework assignment 4 due

Homework assignment 5, due 11/24

Nov 12 Searching and Sorting

Textbook chapter 19 topics:

  • Searching and sorting algorithms
  • Search Algorithms
  • Asymptotic Notation: Big-O Notation
  • Sorting Algorithms
  • Sorting a List: Bubble Sort
  • Selection Sort: Array-Based Lists
  • Insertion Sort: Array-Based Lists


slides (.ppt)

Homework assignment 4 solution added

Review exercises 4 (structs), due 11/17

23,24,25
Nov 17 Pointers

Textbook chapter 13 topics:

  • Pointer Data Type and Pointer Variables
  • Address of Operator
  • Dereferencing Operator
  • Initializing Pointer Variables
  • Dynamic Variables
  • Operations on Pointer Variables


slides (.ppt)

In-class examples:

Review exercises 4 (structs) solutions

Nov 19 Pointers and dynamic memory

Textbook chapter 13 topics:

  • Classes, Structs and Pointer Variables
  • Dynamic Variables
  • Dynamic Arrays


slides (.ppt)

In-class examples:

Review exercises 5 (pointers), due 11/24

26,27,28
Nov 24 Finishing pointers, enum, phone book design

Textbook chapter 8 topics:

  • Enumeration Type


slides (.ppt)

In-class examples:

Review exercises 5 (pointers) solutions

Homework assignment 5, due

Homework assignment 6, due 12/10

Nov 26 Thanksgiving
 
Dec 1 Implementing the phone book (lead in to classes)

Textbook chapter 8 topics:

  • Enumeration Type


slides (.ppt)

In-class examples:

Dec 3 Classes

Textbook chapter 8 topics:

  • string Type

Textbook chapter 11 topics:

  • Classes
  • Data Abstraction, Classes, Abstract Data Types
  • Information Hiding


slides (.ppt)

In-class examples:

Review exercises 6 (classes)

29,30
Dec 8 Computer ethics

slides (.ppt)

Review exercises 6 (classes) 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.

Homework 6 due
 
Dec 15 Finals Week
Dec 17 Final Exam 8:00-9:45am
 

Lab Materials

How to use Microsoft Visual C++

Lab # Lab Name Lab Files
1 "Hello, World!" and chars, strings and numbers lab_1.cpp
2 cin, getline, cin.getline, cin.ignore lab_2.cpp
3 math expressions, type conversion, named const, combined assignments lab_3.cpp
4 random number generator and output formating, file I/O lab_4.cpp, lab_4_data.txt
5 strings, C-strings, and string operations lab_5.cpp
6 logical expressions and if statements lab_6.cpp
7 switch statements vs. if-else statement lab_7.cpp
8 enumerated data types and string comparisons lab_8.cpp
9 simple while loops lab_9.cpp
10 simple for loops lab_10.cpp
11 simple do-while loops lab_11.cpp
12 continue and more about break lab_12.cpp
13 nested loops lab_13.cpp
14 simple functions and header files lab_14.cpp, lab_14_head.h
15 value parameters vs. reference parameters lab_15.cpp, lab_15_head.h
16 simple modular design and functions lab_16.cpp, lab_16_head.h
17 more modular designs and functions lab_17.cpp, lab_17_head.h
18 array declarations and simple I/O lab_18.cpp,
19 array parameters to functions and file processing lab_19.cpp, lab_19_head.h, lab_19_data.txt
20 paralle arrays and two dimensional arrays lab_20.cpp, lab_20_head.h, lab_20_data.txt
21 arrays of structs lab_21.cpp, lab_21_head.h
22 linear search lab_22.cpp, lab_22_head.h
23 binary search lab_23.cpp, lab_23_head.h
24 bubble sort lab_24.cpp, lab_24_head.h, lab_24_data.txt
25 selection sort lab_25.cpp, lab_25_head.h
26 insertion sort lab_26.cpp, lab_26_head.h
27 pointers, pointer arithmetic, pointers vs. arrays lab_27.cpp, lab_27_head.h
28 more pointer practices lab_28.cpp, lab_28_head.h
29 classes lab_29.cpp, lab_29_head.h
30 more classes, a bank example lab_30.cpp, lab_30_head.h

Optional lab exercises (extra credit for your lab score)

These labs provide extra credit opportunities for your lab score. Obviously, turning in all 30 of the labs is the best way to improve your lab score. With these labs you can make up for any points lost on any of the 30 labs. This extra credit can not cause you lab score to exceed 30% of your total course score.

Optional Lab # Lab Name Lab Files
Lab Optional 1 Char and string comparisons, and conditional operator optional_lab_1.cpp
Lab Optional 2 Function overloading and static variables optional_lab_2.cpp, optional_lab_2_head.h
Lab Optional 3 Array paramters to functions optional_lab_3.cpp, optional_lab_3_head.h
Lab Optional 4 Vector class template and structures optional_lab_4.cpp, optional_lab_4_head.h