Introduction to Computing and Programming – MAT 271 (02)  Prof. Salane

Based on 6th Edition of Deitel & Deitel1

 

Lecture

Topic

Description

1

 

The programming process

Typical parts of a program: input, storage, process and output.  Using the Visual C++ program development environment.  Template for a simple C program. An overview of the programming process: specification, design, analysis and testing.

2

 

A programming model

The imperative language programming model.   Identifiers and four attributes of a variable.  Simple operations on data.   

3

 

Input/Output

A simple program to read, calculate and write results.

Input from the keyboard and files. Writing output to files.

Header files and program libraries.

4

 

Processing data

Algebraic expressions, arithmetic operators, boolean variables, logical operators, and operator precedence rules.  Introduction to simple decision statements.

5

Review. Discussion of Programming Projects

 

6

Exam I

 

7,8

An introduction to code encapsulation

Functions for procedural abstraction and code reuse.  Standard libraries.   A brief introduction to classes to encapsulate code and data.  The role of the main program in an object oriented program.

9,10

 

Control structures for code selection

Single sided and double sided selection statements.  Statement blocks.  Multiway decision statements.  Grade assignment example program. 

11,12

Control structures for repetition, assignment statements

Counter controlled and sentinel controlled repetition. 

Assignment operators, increment and decrement operators.

Computing a class average using counter controlled repetition.

Computing a class average using sentinel controlled repetition

13,14

 

More control structures and decision statements  

The for and do…while repetition statements.

The switch statement.

Break and continue statements.

A grade book program to compute distribution of letter grades.

 

15

Discussion of programming projects

 

16,17

 

Operators.  Good programming practice

Logical operators. Rules for forming structured programs.  Validating program input.  Code documentation. 

18

Exam II

 

19,20

 

Functions and modular program development

Function definitions and parameters. Top down design.

Math library functions.  More standard library header files.

Storage and scope rules. Passing parameters by call and reference.

Function recursion.  Recursion vs. Iteration.  The Fibonacci Series.  Validating function parameters.

21,22

 

Arrays

Declaring an array.  Using character arrays to store and manipulate strings. Static local arrays and automatic arrays. Passing arrays to functions. Using an array to store grades.  Programs to sort and search arrays. 

23

 

Arrays, discussion of programming projects

Multidimensional arrays.  Program example: order of access of a large array and the affect on execution time.

24

Exam III

 

25

Pointers

Pointer declarations and initialization, pointer operators, passing arguments to functions by reference.  Selection sort.  Pointer arithmetic.  Relationship between pointers and arrays. 

26

Pointers and strings.

Operations on strings.

 

27

A programming example that uses pointers, arrays and strings.

Card shuffling and dealing simulation.

28

 

Final Exam

 

 

1 We will make every effort to follow the schedule outlined above.  However, we may proceed more quickly or slowly than indicated depending on the needs of the class.  Students must keep up and complete assignments on time.