Course Syllabus

 

Fall Semester, 2005

 

CIS C071 Section 9

Introduction to Computers and Computer Programming in C

 

Instructor: Richard Beigel

 

 

Lectures:        Mon:  4:40pm - 7:10pm (TL 1B)         

    

Lab Times:     Section 9: Wed  4:40pm – 6:30pm  (CC 104)

 

My Office:       Wachman Hall (nee Computer Center Building) Room 408

 

Hours:             7:30pm - 9pm, Monday and 2:30pm - 4pm Wednesday (drop in).   Other hours by appointment. The 4th floor is usually locked after 8pm. Please walk over directly from class or call my office for access.

 

Appointments should be scheduled AT LEAST one day in advance.  Try to verify that I will be there before you make any sort of a lengthy trip to see me.  I sometimes have meetings or other commitments that take me away from the office.

 

Phone:            215-204-6975 (external), 1-6975 (internal)

 

FAX:               215-204-5082

 

E-Mail:            my last name@cis.temple.edu

 

Home page:   http://knight.cis.temple.edu/~beigel          

 

Teaching Assistant:  Mike Mays

  Office:  758 Wachman Hall                   Phone: 215-204-5359 (external), 1-5359 (internal)
  Email:  mike.cis71@temple.edu

  Home page: TBA

  Office Hours: Tuesday 2-4 Wachman 758 (phone or drop in)

Lab Helper:  Kevin Ferrero

  Office:  TBA                   Phone:TBA
  Email:  ferrerok@temple.edu

  Home page: TBA

  Office Hours: Monday 2:30-4:00 Wachman 215, Tuesday 4-6 Wachman 200

 

Prerequisites: First-level core math course

 

Description: In CIS C071, we introduce computers and computer programming in the C programming language.  The topics covered include the general characteristics of computers, techniques of problem solving using the computer, algorithm development, the C programming language, and writing, debugging and testing computer programs.  There will be a significant focus on problem-solving and problem-solving strategies, from problem statement analysis, to algorithm development, and, finally, to program implementation in the C programming language.  Problem solving methodologies are as important, if not more important, than the actual  programming in C.  CIS 71 cannot be taken for credit if you have already completed CIS 61, 67 or 81.  CIS 71 is a second level math core course.

 

Textbook: Problem Solving and Program Design in C, 4th Edition, Hanly and Koffman, Addison-Wesley, 2004

 

Reference Material: Kernighan and Ritchie, The C Programming Language, 2nd Edition, 1988, Prentice-Hall (in bookstore for either CIS C071 or 0072).

 

Labs: Students MUST be enrolled in a lab section in order to take CIS 71 for credit.  Students are REQUIRED to attend the lab section that they are registered for.  Attendance will count as part of your grade.  Three types of lab assignments will be given during the semester:

 

·        (if ready this Fall) The first type will involve the use of specialized self-paced software providing short exercises to test your knowledge of C.   These exercises are independent of other parts of the course and are being used experimentally.

 

·        The second type will involve testing or modifying C programs that will be provided to you.  You should be able to complete this second type of exercise during your assigned lab section provided you familiarize yourself with the exercise prior to attending lab.

 

·        The third type of assignment involves writing C programs to solve programming projects assigned from the textbook.  You should expect to spend some time working on these exercises outside of your scheduled lab time.

 

Quizzes:   Quizzes will be given once a week, normally during the first 10-15 minutes of class.   The total of your quiz grades will be equal to the value of one exam.

 

Grading:   There will be two midterm exams and a final exam during the semester. Your semester grade will be based mostly on your exam  and quiz scores, although lab assignment work can be used to raise (or lower) your final grade by as much as a letter. You  MUST receive at least a SOLID D grade in your exam and quiz scores AND have B or better lab scores in order to receive a passing grade (C or  better) for the semester.  I do NOT drop any exam scores!  More  details on grading appear in the Course Guidelines document.


Weekly Schedule:  Note that the schedule below is tentative and will be adjusted as the course progresses.  The labs are especially tentative and will probably change as the semester progresses.  (See website and handouts for details of each Lab assignment.  The lab pointers below all point you to the same web page.  From there you can get the lab you need.  You are expected to be following along in the notes on the web, including the reference documents, when appropriate.

Week 1 - Overview of hardware and software; Translating, linking, executing a program. Software Development – understanding system behavior.  Introduction and overview of C: Variables, Data types. Declaration and executable parts of a program, including input, output and assignment statements.

Case Study: Miles to Kilometers (Fig 1.13) ; Coin Collection Value (Fig 2.12) .
Reading: Preface, Chapter 1 all.  Chapter 2 (2.1-2.5) 
Assignment (do not hand in, but you may be quizzed on these without warning): :

Quick Check Exercises: Chapter 1, p. 29 (odd numbered exercises).  Chapter 2, pp. 88-89 (1, 2, 5, 6, 10).

Review Questions: Chapter 1, pp 30-31 (1-8, 12).  Chapter 2, pp. 89-90 (1, 2, 4, 7).

HW01: You don't have to do HW01, Understanding a Problem Statement – Data Tables and Behavior Diagrams. Do the reading for next week instead.

Lab01: Understanding a Problem Statement (turn this in to the Lab Helper) – Miles-Kilometers Conversion. Important: To capture what appears on your screen, use the command "script mi2km-demo.txt". (Fedora does not support the "capture" command.) Then run your program (several times, with different input data, preferably). Then type "exit" (otherwise you will continue capturing everything else you type). (Type "exit" only once to avoid closing your terminal window.) Always use the .txt extension when running "script" to avoid accidentally overwriting your program file.

 

 

Week 2 - Formatting output. General Discussion of C constructs you are using in your programs.   Building Programs: Libraries and Library Functions, Top Down Design, Functions without Arguments, Functions with Input Arguments, Testing.

Case Studies: Circle Area & Circumference; Flat Washer Weights; Stick Figure.
Reading:  Chapter 2 (2.6).

Assignment::

Quick Check Exercises: Chapter 2, p. 89 (4 and 7),

Review Questions: Chapter 3, p140 (1-4)

HW02: Forcing Syntax Errors

HW03: You don't have to do HW03: Data Table and Behavior Diagram for U.S. Coins. Concentrate on HW02 and Lab02 instead. (Lab02)

Lab02: English Coins
 

 


Week 3 - Building Programs: Libraries and Library Functions, Top Down Design, Functions without Arguments, Functions with Input Arguments, Testing.

Case Studies: Water Bill, Water Bill II with conservation requirements.
Reading: Chapter 3 all        

Assignments:

Quick Check Exercises: Chapter 3, p. 138 (2, 4, 6, 8)

Review Questions: Chapter 3, p140 (1-4)

Lab03: Male--Female Stick Figures I

 



Week 4 - Control structures; Conditions; If statements; Switch statement, Logical expressions and operators; tracing an algorithm; Nested if statements.

Case Studies: Water Bill, Water Bill II with conservation requirements.
Reading: Chapter 4 all        

Assignments:

Quick Check Exercises: Chapter 4, pp. 199-200 (2, 3, 4, 9, 10)

Review Questions: Chapter 4, p202-03 (2, 3, 5)

HW04: Data Table and Behavior Diagram for Grade Conversion Program (Lab04)

Lab04: Convert Numeric Score to Letter Grade Equivalent

Lab04A: Optional – extra credit: Adding Arms to Stick Figures
 

 


Week 5 - “While”, “For”, “Do-while” Loops, Counting Loops, Accumulating a sum/product; Conditional loops; Input validation loops, Sentinel controlled loops, Nested Loops; Debugging programs with loops.  Loops and Functions and their relationships.

Case Studies: Monitor Gasoline Tank, Radiation Levels
Reading: Chapter 5 all.  

Assignments:

Quick Check Exercises: Chapter 5, pp. 269-270 (2, 3, 5, 11)

Review Questions: Chapter 5, p. 269-70  (2, 5, 7)

Two short programming assignments: Dimes Addition; Powers of ½ (see Lecture notes for link) -- due at the end of Lab

HW05: Function Interfaces for Expandable House Figure (Lab 5) -- due at the start of lab.

Lab05: Print Expandable House Figure -- due one week from the start of lab

 

Week 6 - Numeric and Character data types. Internal representations of data.  Binary number systems.  Computer data as (approximate) models of real-world information.  Enumerated Data

Reading: Chapter 7 (7.1-7.3)
Assignments: Review Questions: Chap 7 (1-3), p354

Lab06: Stick Figures Display with Loops

 

Week 7 – Structured Data I: Arrays, subscripts, array arguments; Searching, Sorting

Case Study: Sorting an Array

Reading: Chapter 8 (8.1-8.6)
Assignments: Review Questions: Chap 8 (1-6), p. 417.

Lab07a: Simple Statistics with Arrays and I/O

 

 

Week 8MIDTERM

Lab07b: Repeat of Numeric Score to Letter Grade Conversion (Using Functions and Arrays)

 

Week 9 - Structured Data II – Structs; Structure types as I/O data; Structure type arguments and function results
Case Study: Lookup tables as arrays of structs

Reading: Chapter 11 (11.1 - 11.3)    

Assignments: Review Questions 1, 2, 4: Quick Check Exercises 1-6, 8.  Chap 11, p. 587.

Lab08: Repeat of Numeric Score to Letter Grade Conversion (Using Functions and Structs)

 

 


Week 10
- Strings. Read Chapter 9. See Lecture Notes on Pointers and Strings. Do Lab10R: Counting Words.

 

 

 

Week 12Structured Data III - Strings – the Basics: String Library functions, Concatenation, String Comparison, Character Operations
Case Study: (none)

Reading: Chapter 9 (9.1 - 9.4, 9.6)
Assignments: Review Questions: Chap 9, p484.

Lab09: Noun Plurals

HW09R-11R: Data Tables, Behavior Diagrams, and Function Interfaces for Word Count Problem (Lab09R/Lab11R)

Lab09R: Counting Occurrences of Words using Keyboard Input (two-part lab)

 

 

Week 13 - Functions with output parameters; Pointer & Indirection Operator, Scope of identifiers; Formal & Actual Parameters, Debugging & Testing a Program System

Case Study: Swapping memory cell contents.   Determining sign, whole number, fractional part of a real number.
Reading: Chapter 6  (6.1-6.4, 6.6, 6.7)       

Assignments: Review Questions: Chap 6, p317.

Lab10: Age vs Relative Bone Density

Lab10R: Determine Separate Parts of a Floating Point Value

 

 

 

Week 14 - Text File I/O, Arrays continued

Reading: Chapter 12, Sec 12.1
Assignments: Study carefully the code for the Lab                  

Lab11: Repeat of Numeric Score to Letter Grade Conversion (Using Files, Functions and Arrays)

Lab11R: Counting Occurrences of Words using External File Input

 


Week 14 - Wrap-Up and Review
Assignment:
(to be determined)

Final Exam will cover Chapters 1-9, 11,12 and all assigned homework and labs.

The exam will be on Monday of finals week from 4:40 to 7:10pm, just like the class.   I need to know if anyone has exam conflicts with this date.