CPSC 331 — Java Development Exercises

Programming Cartoon

Java Development Exercises

Overview

Almost all lectures and tutorials in this course will concentrate on the design and analysis of data structures and algorithms. However, assignments will include questions that must be answered by developing Java programs and giving evidence that these correctly and efficiently solve the problems they should.

A small amount of help to set up your Java development environment will be provided during the second week of the course. Students will be expected to make use of the supplied material — available on this page — and work independently to get things running, after that.

Useful Information If You Just Arrived — or Only Use Windows

Most of the students in this course have completed two half-courses in computer science at the University of Calgary and they can probably skip over the beginning of the material that follows. Students who are also familiar with the UNIX/Linux operating system and have already been using it to do course work, for computer science courses, can possibly skip over the rest as well. However, students who have only been using the Windows operating system will need to become familiar with UNIX/Linux and the support for this provided by the Department of Computer Science.

Exercise #1: Waking Up and Smelling the Roses (or the Coffee)

This includes steps to follow in order to make sure that Java can be used with the Department of Computer Science’s systems, along with links to information about the Java programming language.

Exercise #2: Connecting the Dots (or the Class Files)

This includes instructions that you can follow in order to make sure that Java class files are stored, and found, in standard places. This is important, and you should make sure that things work as expected now, because it is not guaranteed that your source code will be compilable by markers when you submit code for assessment, otherwise!

Exercise #3: Enjoying Coffee at Home

This includes instructions that you can follow to set up a Java development environment on your computer at home (if you do not already have one), so that your work can be done without logging onto a compute server at school. Please note, though, that any code that you submit for assessment will be compiled, run and tested using the Department of Computer Science’s compute servers — so that marks might be lost, or your program might not be marked at all, if your program cannot be compiled and run in this way.

Exercise #4: Give a Man a Fish... (About Oracle’s Java Documentation)

This exercise includes information about Oracle’s online Java documentation. It also mentions a problem with the Java implementations of algorithms from Lecture #3 and Tutorial Exercises #3 and #4, and encourages you to try to use the online documentation, being discussed, to produce better Java implementations, in order to solve the problem that has been noticed.

Exercise #5: “What Do You Mean, My Code Isn’t Flawless?”... Part One

This discusses the use of the test harness “JUnit” to run tests on Java programs.


University of Calgary Extension of Logo
Department of Computer Science

cpsc 331 computer science faculty of science u of c

cpsc 331 introduction and math review analysis of algorithms basic data structures and adts search trees hash tables searching and sorting graph problems and algorithms assignments tests java development exercises