CMP 131 Introduction to Computer Programming

Instructor: Violetta Cavalli-Sforza

E-mail: violetta_rabat<AT>yahoo.fr

Class Meetings: Monday & Wednesday 12:30-14:00, B13; Thursday 12:30-14:00, LAB01

Textbook: Pascal - Understanding, Programming and Problem Solving, D.W. Nance, West.

Grading Policy: Final 30%, Midterm 20%, Quizzes 30%, Homework 10%, Participation 10%

Final Exam: Monday June 4, 12:30pm-14:00, B13.

Week
Dates

TopicSyllabus presentation

Lecture Slides
Reading
Control/
Homework
1

Mon, Feb 26
Wed, Feb 28
Thu, Mar 1

Introduction; computer architecture and organization; computer hardware; central processing unit (CPU), memory management (MM), devices, SSU. Computer software. Programming languages: machine and low-level and high-level languages.

Monday
Wednesday
Thursday

1.1-2

(OPTIONAL)
Think of 3 tasks you have encountered in your studies that you would like to write a program for. Send them to me by e-mail.

2
Mon, Mar 5
Wed, Mar 7
Thu, Mar 8

Program development life-cycle.
Programming philosophy; problem solving: planning. Formulating algorithms with top-down design; stepwise refinement.
The software-engineering process.
Analysis, design and implementation steps in problem solving. Sequential problem solving. Analysis: required data and expected results. Design: input data. Data types. Process the data for extracting results. Output the results.

Monday
Wednesday
Thursday was an introduction to the TurboPascal IDE.

1.3

 

Homework #1
Assigned Mon, Mar 5
Due Thu March 8

3
Mon, Mar 12
Wed, Mar 14
Thu, Mar 15
More examples and practice in top-down design, stepwise-refinement, analysis, design and implementation.
Algorithms: sequential, selection and repetition concepts. Stacking vs. nesting.

Monday
Wednesday
Thursday


Quiz 1
Wed March 14

4
Mon, Mar 19
Wed, Mar 21
Thu, Mar 22
Pascal program structure (outline): reserved words, identifiers, pre-defined data types, output procedures, formatting, input procedures. Variables and variable definition. Constants and constant definition. Data types, expressions and operations.
Monday
Wednesday
Thursday
1.4-5,
2.1-2.2

Homework #2
Assigned Wed, March 21
Due
1) March 26 (non-programming)
2) April 14 (programming)

5

Mon, Mar 26
Tue, Mar 27
Wed, Mar 28
Thu, Mar 29

Data types, expressions and operations. Expressions and the Assignment statement. Input / Output and formatting.
Lab: exercises, homework 2.

Monday
Tuesday
Wednesday
Thursday
1.4-5,
2.1-2.4

MakeUp Lecture on Mar 27
is in LAB01

Quiz 2
Wed March 28

Mon, Apr 2
Wed, Apr 4
Thu, Apr 5
NO CLASSES (March 31 - April 8) - HOLIDAY BREAK
-----
-----
-----
  Mon, Apr 9
Wed, Apr 11
Thu, Apr 12

NO CLASSES - INSTRUCTOR OUT OF TOWN

-----
-----
We'll make these up on Tue March 27, May 15 & 22
6
Mon, Apr 16
Wed, Apr 18
Thu, Apr 19

Selection. Making decisions. Conditional structures.
Yes/No choice and either/or choice. The IF statements: IF ... THEN; IF .... THEN ... ELSE ... .
Compound statements: BEGIN ... END.
Relational and logical operators. Priority levels.
LAB: Homework #3.

Monday
Wednesday

4.1-3

 

Homework #3
Assigned Thu, April 19
Due Wed, May 2
7
Mon, Apr 23
Wed, Apr 25
Thu, Apr 26

Multiple choices : the extended IF statement.
Testing conditional structures.
Nested conditional structures.
LAB: Homework #3

Wednesday
4.4-4

MidTerm Exam
Mon, April 23

MIDTERM EXAM TOPICS

8
Mon, Apr 30
Wed, May 2
Thu, May 3
Midterm Results
Multiple choices : the CASE statement.
Standard functions.
LAB: Homework #4
Wednesday


4.5,
2.5

Homework #4
Assigned Mon, April 30
Due Sun, May 13
9
Mon, May 7
Wed, May 9
Thu, May 10

Fixed loops/repetition. Counter-controlled repetition. The FOR statement: unconditional loops.
Conditional loops/repetition; pre-test vs. post-test loops.
The Pascal IDE environment. Debugging
LAB: Homework #4

Mon+Wed
5.1-5.2


5.3-5.5
10
Mon, May 14
Tue, May 15
Wed, May 16
Thu, May 17

Sentinel-controlled repetition.
Loop Design & Common Problems
Generating data (numbers and characters).
Nested Loops. Printing patterns.

The Pascal IDE environment. Debugging.


Mon+Wed

Debugging

5.5

Quiz 3
Mon, May 14
Homework #5
Assigned Mon, May14
Due Thu May 31
11-12
Mon, May 21
Tue, May 22
Wed, May 23
Thu, May 24
Mon, May 28
Nested selection and repetition.
Practice loops. Menu-driven programs.
File I/O. eoln and eof functions.
Text processing, text file variables.
Iteration vs. recursion.
Procedures (lightly).
Monday
Wednesday+Monday28
5.6
5.7
6:1
11.1
Quiz 4
Mon, May28
13
Mon, Jun 4
12:30-14:00
Final Exam
-----
6:1
Final Exam Topics