CPSC 225 | Intermediate Programming | Fall 2006 |
This course continues the study of programming begun in CPSC 124. We switch to C++, a language widely used by professional programmers. C++ is similar to Java in many ways, but is a more complex language and offers many low-level features (such as direct manipulation of the computer's memory) that Java does not. C++ also removes some of the automatic checks and "safety belts" that Java provides.
The goal of this course is to build on your skills as a programmer, by reviewing and extending object-oriented programming concepts from CPSC 124 (including classes, inheritance, and polymorphism) and by adding new language features (including pointers, reference parameters, operator overloading, and templates), new algorithmic techniques (recursion), and new data structures (including linked lists, stacks, queues, trees, and, time permitting, the Standard Template Library). Continued attention will also be given to "how to think like a programmer" - that is, the fundamental logical thinking and problem-solving skills which are independent of the particular language being used.
Instructor |
Stina Bridgeman |
---|---|
Office Hours |
M 12:30-1:30pm, W 3-4:30pm, R 10:30am-noon, F 9:30-10:30am |
Class Hours and Meeting Place |
Lecture MWF 1:55pm-2:50pm, Lansing 301 |
Course Web Page |
http://math.hws.edu/~bridgeman/courses/225/f06/ |
Text |
Absolute C++, 2nd edition Additional material will be handed out or posted on the course webpage. |
Prerequisites |
C- in CPSC 124, or instructor permission |
Rationale |
Computer science revolves around programs - creating programs, analyzing programs, making programs more efficient and easier to understand, making it easier to create and maintain programs, considering what programs can and cannot do...the list goes on. The first semester of programming is intended to introduce basic programming skills - the syntax and semantics of a particular programming language, and some of the basics of program design. The second semester of programming is intended to build a more sophisticated and confident programmer, by introducing more complex language features and placing more emphasis on program design, program organization, reusable code, and other features of the object-oriented programming paradigm. Attention will also be paid to several new data structures, to augment the arrays covered in CPSC 124. Programs are all about manipulating data, and choosing an appropriate data structure for a particular application is important for the program's efficiency and simplicity. |
Course Content Overview |
The course material can be divided into five major sections: program design with functions, program design with classes, memory management, data structures and abstract data types (ADTs), and testing and debugging. A few miscellaneous topics which don't fit cleanly into one of these sections will also be included. The objectives listed below paint - in broad strokes - what the successful student should be able to do at the end of each section. Program Design with Functions: This part of the course will focus on program design using functions as the main organizational unit. Along the way, basic programming structures will be reviewed with an emphasis on aspects in which C++ is different from Java. Topics include C++ program structure and compilation, expressions, conditionals, loops, subroutines, functions, reference and const parameters, and I/O. Objectives:
Program Design with Classes: Moving on to a more object-oriented view of the world, this part of the course will focus on designing larger programs using classes as the main organizational unit. Topics include classes, separate compilation and makefiles, inheritance, polymorphism, abstract classes, and virtual functions. Objectives:
Memory Management: One of the major safety belts that C++ removes is memory management - Java handles all of the memory allocation and deallocation automatically, while C++ gives the programmer more control. Topics include pointers, dynamically-allocated arrays, and the requirements for writing well-behaved classes which use dynamically-allocated memory. Objectives:
Data Structures and Abstract Data Types (ADTs): Programs are, ultimately, all about manipulating data. How that data is stored and accessed can have a significant effect on how quickly a program runs, and how easy it is to write and understand a program. Topics include low-level data structures (arrays and linked lists), high-level abstract data types (vectors, lists, stacks, queues, and binary trees), relevant C++ language features (templates, operator overloading, friend functions), and, time permitting, the C++ Standard Template Library (STL). Objectives:
Testing, Debugging, and Robustness: Once implemented, a program must be thoroughly tested in order to verify that it works correctly. If a test fails, then the error must be located and corrected. Topics include designing robust programs (i.e. error-checking), error-prevention (or at least early detection) strategies, designing comprehensive tests, and debugging strategies. Objectives:
Miscellaneous: A few other useful topics will be covered which don't quite fit into one of the other categories. These include file I/O, working with strings, and recursion. Objectives:
|
Assignments and Evaluation |
Labs: Most lab meetings will have a short lab exercise. These exercises will reinforce specific concepts from class. It is intended that most lab exercises will be completed and handed in during the lab period, but solutions may be handed in any time up until the start of the following week's lab without penalty. Homework: Homework will be assigned most weeks and is typically due one to two weeks after it is assigned (specific due dates will be given with each assignment). Homework assignments will generally be programming assignments (though they may also contain written problems) and will emphasize program design and integrating multiple concepts from class. Journals: A regular journal is required, and will be handed in along with each homework assignment. Exams: There will be two midterm exams and a final exam. The first midterm will be in class, written (no programming on the computer), and closed book/notes. The second midterm and the final exam will be take-home exams, open book/notes, and may involve some programming on the computer. The final will be cumulative, but will have a somewhat greater emphasis on material covered after the second midterm (as much as it is possible to do so). Details on the material covered and the exact format of each exam will be announced prior to the exam. Final Grades: Final grades in this course will be computed as follows:
Attendance and Participation: You are expected to attend and
participate in class and lab. The course material is cumulative and many
topics will be covered, making it difficult to catch up if you fall behind.
Missing class - for any reason - often results in lower grades because
important material was missed. Similarly, not participating in class even if
you are physically present may mean that you aren't actively following the
material and thus may be missing more sophisticated or subtle
points. Late Policy and Collaboration: See the course policies for the late policy and collaboration policy. |