CS 173: Introduction to Computer Science (aka CS I)


Class times: 9:00-9:50am MWF, Pfahler 012
Lab times: 9:00-9:50am Tu, Pfahler 209
Professor: Richard Liston
Office: Pfahler 101G
Phone: 610-409-3000 x2497
Email Address: rliston at ursinus dot edu
Office Hours:
  • Tue, 10-12
  • Tue, 2-4
  • Wed, 2-4
  • other hours by appointment
Prerequisites: None
Text (required): Programming and Problem Solving with C++, 4th Ed. by Dale and Weems; additional readings will be assigned in class.
Example code: Examples of code discussed in class are available here.
Wiki: cs173f08.pbwiki.com

Course Objectives

The course catalog description of CS 173 is as follows:
Problem-solving methods and algorithm development. Computer programming with a high-level language. Design, coding, debugging, and internal and external documentation of programs. Emphasis on developing good programming style. Programming projects of increasing complexity. Recommended for students in mathematics and the natural sciences. Three hours of lecture and one hour of laboratory per week.

More generally, the purpose of CS 173 is to give students a sense of what the field of Computer Science is about, as well as the relationship of technology to today's society. Students will develop skills that will be useful throughout their studies, and probably throughout their lives. In this course we will learn by doing; you will write many programs in the C++ language, each of which incorporates the concepts discussed in class and builds upon previous knowledge. The course also requires participation in a series of labs. These labs are designed to enhance your general understanding of the computer world, while providing you with the tools that will help you build solid computer programs.


Labs

Each week at 9am in Pfahler 209 there will be a 1-hour weekly lab associated with the course. In these labs we will explore topics discussed in class more deeply, as well as other topics designed to enhance your understanding of computers. The content of the labs will be assigned at the start of the lab and will also be available online at http://webpages.ursinus.edu/rliston/cs173/labs.html. All labs are due by class time on Friday. Your assignments will be posted with brief comments for viewing by the entire class.


Attendance Policy

On-time attendance is required at all class meetings and labs. Attendance will be implicitly taken at the beginning of the class period. Class participation helps me gauge the level of understanding of the material in the class, so this makes up a portion of your grade.

Grading

Class participation and attendance 10%
Labs, Homeworks and projects 30%
Two 50-minute in-class exams (20% each) 40%
Final Exam 20%

Grades for labs, homeworks and projects will be assigned as follows:

0 Assignment not received on time
1 Assignment attempted but displays minimal effort
2 Assignment works for some cases, but has bugs or coding style is substandard
3 Assignment works properly and employs good coding style

These points will be averaged at the end of the course and multiplied by 10 to determine the contribution to your final grade. For example, if your average at the end is 2.5, then you have earned 25 of the 30 percent allocated to this portion of your grade. Extra points may be awarded for assignments that exhibit creativity but still work according to the specification.
Grades for each exam will be scaled to 100 points, with the final grade weighted as indicated above. The final grade will be out of 100 points, with the letter grades assigned as A=90-100, B=80-89, C=70-79, D=60-69, F=below 60. A plus (+) or minus (-) may be added to the grade for work that is at the top or bottom of the range. The Criteria for Software Evaluation describes expectations for programs. The professor reserves the right to raise the final grade of students who have demonstrated earnest attempts at achieving the objectives of the course.
Late Assigments: Projects, homeworks and labs that are not turned in on time may be turned in up to 24 hours after the due date for a maximum of 1/2 credit. To be fair to students who have met the deadline, the posted due date and the 24 hour grace period are firm unless you have received prior approval. This policy is solely intended to accomodate extreme circumstances. Handing in late assignments delays returning the graded material to the rest of the class. It is highly recommended that you turn in all assignments on time.
Office Hours: Please make use of my office hours for any reason at all throughout the course. Chelsey Morien (chmorien@ursinus.edu) is also available for assistance during and outside the labs. Also note that several of the students in the Math Help Room have taken CS 173.


Coding Style

One of the primary objectives of this course is to make sure students develop good programming style. I have begun maintaining a Coding Standard for my classes that you should use as a reference. As you learn more about the C++ language, more of this standard will apply to you. A significant portion of your grade will depend on adhering to it. Make sure that you are reading and incorporating the portions of this standard that apply to you.

Academic Integrity

Unless otherwise stated you will turn in all your homeworks and code individually, and everything you turn in must be your own work. All code turned in must be commented with your name, the date, the course number and name, and a short description of the file. When you sign the code you are saying that you wrote it all and that you can answer detailed questions about every line. Do not try to disguise the fact that you are turning in someone else's code. It is better to turn in a non-working project than to risk dismissal. Refer to the handout, Academic Integrity in Computer Science at Ursinus College for more information, and ask me if you have any questions. Any suspicion of violation of the Academic Integrity Policy will be referred to the Dean without hesitation.


Inclement Weather Policy

If it becomes necessary to cancel class due to inclement weather I will make every attempt to send an email to all class members, so please check your email if there is any question. If you are commuting to campus, please provide me with your telephone number so I can call to let you know if class is cancelled due to inclement weather.

C++

Introductory Computer Science courses typically choose one computer language that the students will use throughout the course. There is much discussion about which language is the "best" first language. While there is no such language, for CS 173 we have chosen the C++ language. C++ is widely used for both large and small projects and gives students a good feel for the process of writing programs. It also simplifies certain common tasks, and it supports object-oriented programming - something we will get to later in the course. In CS 173 we will emphasize building good design and programming habits that will help you throughout a career in computer science, or for that matter, in any discipline.


CS 173 Schedule, Fall 2008

(Subject to change.)
Week Beginning Lecture Topics Reading
by Wed each week
Notes
Aug 25 Administrivia and Course Intro
Computers, Programs and Programming
Software Development Process
Overview of C++
Course Syllabus
Chapter 1
Labs begin Tue 9am, Pfahler 209
Sep 1 Elements of C++ Programs
Syntax and Semantics
Program Structure
Programming Style
Statements
Constants
Expressions
Type Coercion
Chapter 2 Sep 8: Last day to add a course
Sep 8 Namespaces
Preprocessor Directives
Input Statements
Flow of Control: Decisions
Functions/Function calls
Output Formatting
Dot Operator
String Operations
Precedence
Modulus Operator
Chapter 3
Chapter 4, pp139-144
 
Sep 15 Boolean Expressions
Relational Operators
Logical Operators (AND,OR,NOT)
"if" statements
"if-else" statements
Blocks
Numeric Data Types
Program Specification
More Input Functions
File Input/Output
Section 4.4-4.5, pp152-162
Chapter 5, pp192-219
 
Sep 22 Flow of Control: Looping
"while" loops
Designing Loops
Nested Logic
Chapter 6, pp249-304 Exam 1 this week
Sep 29 Functions
Void Functions
Functional Decomposition
Functions with Parameters
Chapter 7, pp305-359
Chapter 4, pp166-172
 
Oct 6 Value Parameters
Reference Parameters
Useful functions
Scope of Identifiers
Chapter 8, pp361-416  
Oct 13 Scope of Identifiers (cont.)
Variable Lifetime
Interface Design
Value-Returning Functions
Unit Testing
"switch" Statements
Chapter 8, pp374-416
Chapter 9, pp417-423
No Class Oct 13-14: Fall Holiday
Oct 20 "do-while" Loops
"for" Loops
Built-in Types
Chapter 9, pp423-448
Chapter 10, pp449-456
 
Oct 27 User-Defined Types
Character Data
Floating-Point Representations
Additional C++ Operators
Typedefs
Enumerated Types
Structures
Chapter 10, pp456-518
Chapter 11, pp519-537
 
Nov 3 Unions
Abstract Data Types
C++ Classes
Information Hiding
Code Reuse
Chapter 11, pp531-547
 
Nov 10 Arrays
Array Indexing
Arrays of Records
Character Strings
Two-Dimensional Arrays
Higher-Dimensional Arrays
Classes and Objects
Types of Member Functions
Specification File
Implementation File
Chapter 12, pp587-608
Chapter 13, pp696-721
Chapter 12, pp609-659
Chapter 11, pp547-586
 
Nov 17 Array-Based Lists
Constructors
Desctructors Sorting
Sorted Lists
Chapter 13, pp661-696  
Nov 24 Pointers
NULL Pointers
Arrays as Pointers
Chapter 15, pp781-792
Nov 26-28: NO CLASS (Thanksgiving recess)
NO LAB THIS WEEK
Dec 1 Dynamic Data
Reference Types
Linked Structures
Array Linked Lists
Dynamically Linked Lists
Final Exam Review
Chapter 15, pp792-843
Chapter 16, pp845-906
 
  FINAL EXAM
Dec 9, 2008, 9:00am-12:00noon
   

Richard Liston