CPSC 331 — Java Development Exercises
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.
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.
Computer Science Technical Support: Students who have just arrived at the University of Calgary may need to start here, in order to obtain a CPSC user account and learn about the general computing services that are available.
Remote Access — SSH: This is one of the articles linked to, from the general “Technical Support” page above. It gives information about how the department's computing facilities can be accessed from off-campus.
UNIX/Linux Tutorial: Students who have only used Windows, before this, should work through everything in the “Unix/Linux for Beginners” section of this online tutorial. The section on “Unix/Linux Shell Programming” is also recommended, and might be quite useful later on, when “testing using shell scripts” is considered.
Bash Guide for Beginners: The tutorial given by the previous link might be all that you need! It discusses the use of any of several similar “shell command languages.” This second tutorial concerns one of these shell command command languages, namely, the language “Bash” that is used, by default in the computer science department.
The first three chapters include information — including information about “Shell initialization files” — that will might be useful if you need to make changes to your computing environment, in order to use Java development tools, during this course. It is not clear that you will need material in later chapters during this course, but they might be of interest.
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.
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!
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.
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.
This discusses the use of the test harness “JUnit” to run tests on Java programs.