CS 202 Programming Systems

Credit Hours: 4
Course Coordinator: Karla Fant
Course Description: Students will become familiar with the language and operating system environment used in most upper division courses in the Computer Science major curriculum. Use of the file system, operating-system calls, and shell-level programming; low-level debugging of high-level programs. Programming exercises will include applications from data structures (e.g. B-trees) and memory management techniques.Prerequisites: CS 163, 201.
Prerequisites: CS 163, data structures
Goals: To introduce Computer Science students to advanced C and C++. Students will understand the difference between programming in C and C++, gaining practical experience using pointers to pointers, pointer arithmetic, and dynamic memory. Students will learn about C++'s function overloading, operator overloading, copy constructors, inheritance, and templates. Students will implement data structure algorithms as exercises in both C and C++. As part of the projects UNIX tools will be used, such as shell, makefile, and source code control facilities in the development and modification of large real world applications.

Upon the successful completion of this course students will be able to:

  1. Apply object oriented design to a C++ programming problem.
  2. Evaluate the benefits and drawbacks of their design in terms of memory and run time efficiency.
  3. Apply advanced data structures to programming problems, such as balancing techniques, trees of trees, or arrays of trees.
  4. Program using copy constructors, dynamic binding, operator overloading, single inheritance in situations requiring dynamic memory.
  5. Describe how RTTI, user defined type conversions, exception handling, multiple inheritance, virtual inheritance, and templates in C++.
  6. Build new data types and have them appear seamless as if they were part of the language using data abstraction and operator overloading.
  7. Develop efficient solutions to complex problems.
  8. Produce high quality, robust, maintainable, and efficiency object oriented solutions.
  9. Develop programs using Java.
  10. Compare and contrast programs in Java and C++.
Textbooks: The (ANSI) C Programming Language, Kernighan and Ritchie.
C++ Primer Plus, Stephen Prata.
References: Optional: Object Oriented Programming using C++, Pohl.
Optional: Weekly Lecture Notes and Course Slides.
On Reserve at the Library: Information on C, C++, UNIX, and Tools.
Major Topics: -Understanding C Programs & Advanced Pointer Manipulation (15 hours) (emphasize the differences between C and C++, stdio.h, function arguments, pointers, pointers to functions, command line arguments multidimensional arrays)
-Advanced C++ concepts (15 hours) (emphasize function overloading, operator overloading, copy constructors; introduce concepts such as inheritance, template functions, template classes, dynamic binding, and user defined type conversions)
-Operating System and Shell level programming (4 hours)
-UNIX facilities, Program development, debugging (6 hours)
Laboratory Exercises: Course requirements consist of five programming assignments in C and C++. Each program will be given between 1.5 and 2 weeks for completion. Programs will exercise complex dynamic memory management, data structures, and pointer arithmetic. Students will implement hash tables, heaps, binary trees, and/or graphs.

CAC Category Credits Core Advanced
Data Structures
Algorithms
Software Design 1.0
Computer Architecture
Programming Languages 3.0

Oral and Written Communications: Every student is required to submit at least __6__ written reports (not including exams, tests, quizzes, or commented programs) of typically _2 pages with each program (5 programs), and 4-7 pages for a term paper and to make _1__ oral presentations of typically _15-20_ minutes duration per group (5 minutes per person). Material is graded for grammar, spelling, style, and so forth, as well as for technical content, completeness, and accuracy.

20% of each program's grade is based on a written discussion of the tools used, and major design consideration encountered when solving the specified problem. These must be one page each, and must be submitted with each programming assignment. They are graded for grammar, spelling, style, as well as technical. Students are required use makefile, lint, debuggers (eg., gdb or dbx), and source code control (eg., rcs or sccs) tools during the term. Each assignment must have an accompanying tool write-up. These writeups must discuss the benefits and tradeoffs when selecting a particular tool.

In addition, each student will be required to submit a 4-7 page, typed, term paper on two approved UNIX tools, due at the final. All tables, code, and examples must be placed as an attachment to this report (and not be included in the 4-7 page count). The paper should introduce the reader to these tools, discuss their usefulness, and discuss features, benefits, and drawbacks.

Teams will be used in this class to become familiar and master the UNIX facilities and tools for program development and debugging. Teams, formed the second week of the term, are expected to meet together outside of class to critically analyze one tool in each of the following areas:

  • Source Code Control (eg., sccs, rcs, xxgdb)
  • Debuggers (eg., dbx, gdb)
  • Interactive Programming (eg., Tcl/Tk)
  • Shell Programming: (eg., perl, csh)

Teams must present their findings to the class in 15-20 minute presentations, where each member of the team must verbally participate.

Social and Ethical Issues: None.
Theoretical Content: None.
Problem Analysis: See Solution Design Statement.
Solution Design: CS202 focuses on issues that students will encounter in real world programming projects. Advanced concepts not encountered before are emphasized, such as alignment issues, deep copying, garbage collection, and implicit operations. In class discussions focus on concepts that are not typically covered by textbooks at this level.

Students are required to take open-ended specifications and apply their C and C++ knowledge to design new data types, as completely as possible. This requires that students make their own judgements on the type of functionality required to fully transform an abstraction into a data type that performs in the same manner as the fundamental data types. This requires significant analysis and design: students are faced with questions such as, can the client create instances of this type that are constant, will they be able to use the standard operators in expected ways, will all dynamic memory be allocated, copied, deallocated consistently with the object's lifetime, etc.