CPSC 225 Intermediate Programming Fall 2018

CPSC 225 Course Information

On this page:


Course Description and Objectives

Catalogue description:

This course builds on CPSC 124, covering some of the more advanced fundamentals of programming including basic data structures (such as lists, stacks and queues, binary trees, and hash tables), recursion, common algorithms (such as searching and sorting), and generic programming. This course also looks more deeply at object-oriented programming, including the use of class hierarchies. Currently, the course is taught using the Java programming language.

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 (CPSC 124) 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 (CPSC 225) 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.

This course covers basic data structures (arrays, linked lists, and binary trees) and abstract data types (lists, stacks and queues, priority queues, maps, and sets) as well as some common algorithms (searching and sorting), fundamental algorithmic techniques (recursion), and writing correct and efficient programs. It also takes a deeper look at object-oriented programming. Additional topics such as GUI programming, client-server programming, streams and files, and threads will be covered as time permits. The course is taught in Java.

By the end of the course, the successful student should be able to:

  • describe the tradeoffs in efficiency and memory usage for arrays and linked lists (all variations)
  • correctly implement basic algorithms involving arrays, linked lists, and binary trees (e.g. traversal, insertion, removal) and to work out algorithms for new tasks involving these data structures
  • describe and implement the typical operations for lists, stacks, queues, priority queues, maps, and sets given a particular implementation
  • use the major classes of the Java Collections framework
  • explain what an abstract data type is
  • describe, implement, and discuss the efficiency of common algorithms for searching and sorting
  • understand and implement recursive methods
  • design and implement algorithms involving recursive data structures
  • use recursive backtracking to solve problems
  • habitually comment code, including writing pre- and postconditions for every method
  • use assertions and exceptions appropriately
  • habitually include error-detection mechanisms
  • habitually define test cases to thoroughly test components of the program
  • do a close reading of the program's specifications to create a reasonable design for a program (organizing the code into appropriate classes and methods)
  • choose appropriate ADTs and implementations for particular applications, and defend the choices made in terms of suitability and efficiency

Prerequisites

C- or better in CPSC 124, or instructor permission


Textbook

Introduction to Programming Using Java, 7th ed.
David Eck

The book is freely available online at http://math.hws.edu/javanotes/.

You can also download a PDF copy or an ebook if you prefer an electronic version that you can read offline, or order a printed copy if you'd like something you can refer to away from the computer. See the "Downloading And Other Links" section at the bottom of the http://math.hws.edu/javanotes/ page for more information. We will primarily use the second half of the book, so you can order just Part II. Or, if you don't have a copy of Part I from CPSC 124 and would like the whole thing, you can save a few dollars by ordering the whole book instead of the separate parts. Please do not print out chunks of the text on the Math/CS department printers.

Any additional material will be handed out in class and/or posted on the course webpage.


Software

All of the software needed for this course is available on the computers in two labs: Rosenberg 009 and the Math/CS lab (Lansing 310).

All of our development will be done using Java 8 in the Eclipse development environment. It is a little inconvenient to work on a single project on multiple computers without using version control, but if you want to set up your own computer so that you can work on assignments without going to one of the labs, you can. You will need three things:

  • Java. If you do not already have a Java development kit (JDK) installed on your computer (or have a version other than Java 8), you can download it here. (Look for the "Java SE Development Kit" link appropriate for your computer - Mac OS X, Windows, or Linux.) You should make sure that you download Java SE (not EE or other edition), the development kit (JDK) rather than the runtime environment (JRE), and Java 8 rather than an older or newer version.

  • Eclipse. Integrated development environments (IDEs) such as Eclipse make the development of larger programs easier. You can download Eclipse Oxygen here - choose the appropriate version for your computer (Mac OS X, Windows, or Linux) under "Download Links". (Note that you should not get the newest version of Eclipse, Photon.)

  • A file transfer program such as Fugu (Mac) or WinSCP (Windows) so you can copy files between your Linux account and your computer. Follow the directions here to download, install, and use the appropriate program for your computer.

Some Eclipse setup will be done in lab. You will need to carry out the same steps to configure your own installation.

Also note that Eclipse projects store some environment-specific configuration information and Eclipse does some management of the workspace directory on its own, so your best bet for transferring projects between the CS computers and your own is to copy the project folder somewhere other than into your workspace, create a new project within Eclipse on the current computer (if you don't already have one for the program you are working on), and then import the source files from the copied folder to the new project via Eclipse. It's a bit awkward but it does get the job done. Stop by if you need help.


Valid HTML 4.01!