|CPSC 225||Intermediate Programming||Spring 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 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.
M 3-4pm, T 1-2pm, W 3-4:30pm, F 9:30-10:30am
|Class Hours and Meeting Place||
MWF 1:55-2:50pm, Lansing 300
|Course Web Page||
You are expected to regularly consult the course web page for announcements, assignments, and most handouts.
Absolute C++, 1st edition
Additional material will be handed out or posted on the course webpage.
C- in CPSC 124, or instructor permission
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. 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 new topics which should be part of every programmer's toolbox. 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.
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.
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.
Generic Programming: The final part 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 introducing C++'s standard template library (STL). Topics include templates, generic programming, abstract data types (ADTs), and STL.
|Assignments and Evaluation||
Exams: There will be two midterm exams and a final exam. The midterms will be in-class, written (no programming on the computer), and closed book/notes. 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.
Quizzes: There will be frequent short (5 minute) quizzes at the start of class throughout the semester, intended to make sure that you keep up with material. They will generally be based on the current week's reading and lecture material. Quizzes are closed book and closed notes.
Homeworks: There will be weekly homework assignments, typically due at the start of class one week after they are assigned. Homeworks will generally be programming assignments, though they may also contain written assignments. You should expect to do a fair amount of programming, as doing is the best practice.
Final Project: There will be a final project, which you will have several weeks to complete. 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.
Lecture Attendance and Participation: You are expected to attend and participate in class. The course material is cumulative, and it is difficult to catch up if you fall behind. As a result, attendance will be taken regularly and more than three absences (for any reason) will lower your final grade. "Participation" means that you are engaged in class - you are not expected to volunteer for everything, but you should contribute to the class in a meaningful way multiple times throughout the semester.
Grades: Grades in this course will be computed as follows:
Quizzes will be graded on a three-point scale:
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:
Programs will be graded as follows:
For the final project, the breakdown is: