|CPSC 225||Intermediate Programming||Spring 2014|
This course continues the study of programming begun in CPSC 124. CPSC 124 focused on the syntax and semantics of Java and introduced basic programming concepts; this course moves beyond the nuts and bolts of a particular language to consider the larger picture of developing more complex programs. Topics include correctness and robustness, the use and implementation of basic data structures (including arrays, linked lists, stacks, queues, trees), using Java's Collections framework, choosing appropriate data structures for the situation, recursion, and working with streams and files. Additional topics such as networking, threads, and GUI programming will be covered as time permits.
|Course Web Page||
Introduction to Programming Using Java, 6th ed. (Part II)
The book is available online at http://math.hws.edu/javanotes/.
You will probably find it convenient to have a printed copy of the text for easy reference during class. Printed copies can be ordered from lulu.com. We will primarily use the second half of the book, so make sure you order Part II. Some material from the first half of the book will also be used; if you do not have a copy of Part I from CPSC 124 and want a printed copy of everything, you can save a few dollars by ordering the whole book. Please do not print out chunks of the text on the Math/CS department printers.
PDF copies of the text are also available if you prefer an electronic version that you can read offline. See the "Downloading And Other Links" section at the bottom of the http://math.hws.edu/javanotes/ page.
Any additional material will be handed out or posted on the course webpage.
C- in CPSC 124, or instructor permission
|Rationale, Aims, and Objectives||
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. This second semester of programming is intended to build a more sophisticated and confident programmer by focusing on skills necessary for the construction of larger, more complex programs. The emphasis on data structures and data organization reflects the importance of managing data in programs - choosing an appropriate data structure for a particular application is important for the program's efficiency and simplicity.
The course material can be divided into five major sections: program design, correctness and debugging, data structures and abstract data types (ADTs), algorithmic techniques, and additional topics. It is worth noting that most of this material is not specific to any one programming language - while we will study them in the context of Java, the ideas and strategies can easily be applied to many other programming languages.
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: This course considers program design within the object-oriented paradigm, focusing on organizing the program's data into classes. It continues the approach introduced in CPSC 124, based on doing a close reading of the program's specifications to deduce classes and methods.
Correctness, Robustness, Testing, and Debugging: Writing a program is only half the job - the program must also 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.
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 the program runs, and how easy it is to write and understand the program. Topics include low-level data structures (arrays and linked lists), high-level abstract data types (lists, stacks, queues, binary trees, maps), and the Java Collections framework.
Algorithmic Techniques: One of the most useful realizations in programming is that the same kinds of problems arise over and over. Solving new problems becomes easier as you build up a toolbox of solution "patterns" - if you can match characteristics of your current problem to one that you already know how to solve, you may be able to use the known solution as a starting point for the current problem. A thorough study of algorithmic patterns is beyond the scope of this course (take CPSC 327!), but we'll be alert to solution patterns as we come across them and will study recursion - a powerful technique which can lead to some very elegant solutions.
Additional Topics: A variety of techniques are used in real software. We will study using streams and files and, as time permits, other topics such as threads, networking, and GUI programming.