CPSC 411: Assignment 1

In this assignment you will prepare the most important tools you will be using for the rest of the course, for your project: the Java programming language and the Eclipse Java development environment. We do not require you to use Eclipse, but, since we may provide assignment / project drops in the form of Eclipse projects, this will make it easier for you. You can download and install the latest "Eclipse IDE for Java Developers" for your system from Eclipse.org.

I also recommend that you work on a Unix system for this project. It will help since we (the instructor and TA) will be using Linux based systems and some of the backend code, that actually converts assembly into executable code, and runs it will be Unix specific and make use of the gcc compiler.

You can use the departmental Unix machines, or install a Linux distro such as Ubuntu on your own personal machine.

Assignment

Write a Java program which will read all of the files named on the command line, and report the size in bytes of each file. The report should be something like this:

 677 exercise_1.html
742 home.html
1419 total

The name of your main class should be WordCount and it should be placed in the Java package ca.ubc.cs411.assignment1.

Hints:

Due date

To help keep due dates consistent and easy to find, all due dates are posted on the main webpage only.

Handin Procedure: 

You will be using handin to submit your completed assignments. The name of the course is cs411, the name of this assignment is assign1. What you handin should include your (appropriately commented) source code. 

To be handed in: only hand in one file: your WordCount.java source file.

Late Policy:

As this assignment is intended to make you do your Java programming setup, and brush up on your Java knowledge in a timely manner, late assignments will not be accepted.

Copying and Plagiarism Policy

Please read the departmental policy on Plagiarism and Collaboration here.

Plagiarism means passing of someone else's work as your own. Plagiarism is a serious offense and dealt with quite harshly by the university.

For this assignment, you are expected to work individually. If you do rely on other peopler's code, for whatever reason, and properly explain the nature and extent of the collaboration, this is not plagiarism (i.e. with proper explanation, you are not implying that the work is your own). You can submit such a properly commented solution for partial credit.

The key to using other people's code without commiting plagiarims is to make it absolutely clear what portion of your assignment is your own work and which is based on someone else's work. When copying something, or adapting it as part of your solution, you are responsible to provide clear references your sources, and to what extent your solution is based on these sources. Code comments are a good way to do that for programming assignments.