CPSC 225 | Intermediate Programming | Fall 2005 |
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 2:30-3:45pm, T 3:30-5pm, R 10:15-11:30am, F
1:30-2:30pm |
Class Hours and Meeting Place |
Lecture MWF 10:10-11:05am, Lansing 300 |
Course Web Page |
http://math.hws.edu/~bridgeman/courses/225/f05/ |
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 four sections: C++ for Java programmers, pointers and linked data structures, advanced object-oriented programming, and generic programming. We will jump between topics in each section, using the central theme of organizing data in a program as motivation and application for the topics studied. The objectives listed below paint - in broad strokes - what the successful student should be able to do at the end of each section. C++ for Java programmers: The first part of the course will quickly review the basics of C++, with emphasis on those parts which are different from Java, and will introduce several new topics which should be part of every programmer's toolbox. Additional C++ language features will be introduced throughout the course. Topics include C++ program structure, expressions, conditionals, loops, subroutines, functions, reference and const parameters, default arguments, static arrays, structs, classes, inline functions, strings, I/O, file I/O, and recursion. Objectives:
Pointers and Linked Data Structures: C++ takes off a number of the safety belts that Java provides when it comes to memory management. This part of the course will cover dynamic (or runtime) memory management in C++, including pointers, dynamic arrays, and classes which dynamically allocate memory. It will also introduce several new data structures including linked lists, stacks, queues, and binary trees. Objectives:
Advanced Object-Oriented Programming: This part of the course will review and further explore object-oriented programming topics first introduced in Java, and will examine some additional features supported in C++. Topics include inheritance, polymorphism, virtual functions and abstract classes, operator overloading, and friends. Objectives:
Generic Programming: The final major section of the course will look at strategies for creating reusable code and for exploiting work already done, including formalizing some common patterns of code and, time permitting, introducing C++'s standard template library (STL). Topics include templates, generic programming, abstract data types (ADTs), and STL. Objectives:
|
Assignments and Evaluation |
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 will be a take-home exam, open book/notes, and may involve some programming on the computer. The final will be cumulative, but may have a somewhat greater emphasis on material covered after the second midterm (as much as it is possible to do so). The final will be entirely in the scheduled timeslot, and may contain a programming component. Details on the material covered and the exact format of each exam will be announced prior to the exam. Homework: Homework will be assigned most weeks and is typically due at the start of class one week after it is assigned. Homeworks will generally be programming assignments, though they may also contain written problems. You should expect to do a fair amount of programming, as doing is the best practice. See the course policies for the late policy and the collaboration policy for homework. Labs: New this semester, there will be weekly lab meetings. There will not be separate lab assignments; rather, the lab period is an opportunity to work on the homework assignments. Your time in lab will be most effective if you spend some time thinking about the assignment before lab, so that you can use the lab to get questions answered. To help you with this, homeworks will generally be assigned the day before lab (and will often be posted even earlier). Final Project: There will be a final project, which will cover much of the second half of the semester. The project will give you an opportunity to work on a larger program than the others you'll create for the course, and to go through the complete process of program development from specification to design to implementation. More details will be provided later in the semester. See the course policies for the late policy and the collaboration policy for the final project. 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. Final Grades: Final grades in this course will be computed as follows:
There is much more to a good program than just having it run correctly - people have to read and work with the program at many stages in the software development process, so it is important to also create a well-organized and well-documented program. As a result, the grade for programming assignments will be based on the following criteria:
The approximate weights for programs will be as follows:
For the final project, the breakdown is:
There are no officially scheduled extra credit assignments - do your best on each regular assignment as it comes along, rather than blowing something off with the idea of making up for it later with extra credit. That being said, there may be opportunities for extra credit on some assignments. Extra credit problems, if present, are likely to be longer, harder, more sophisticated, and/or trickier than the regular problems. You should view extra credit as a bonus for going deeper into the material rather than as a safety net. |