CS 261 Homework 1 - LetterSet

Due Mon Jan 27 at 11:59pm

Overview

This short assignment will help you refresh some of your Java basics, and give you a chance to practice working with the Eclipse IDE. Your task is to create a Java class that represents a "bag of letters". This class will keep track of the number of occurances of each particular letter in the set--so the word "banana" would have 3x 'a', 1x 'b', and 2x 'n'.

This assignment should be completed individually.

Objectives

Necessary Files

You will be creating your own program from scratch for this assignment---select "New > Java Project" from the File menu to create a new project.

You will need to download a copy of the README.txt (right-click on the link and select "Save Link As" to download the file) to fill out and turn in along with your assignment.

Assignment Details

Submitting

BEFORE YOU SUBMIT: make sure your code is fully documented and functional! If your code doesn't run, I can't give you credit!

Submit your program to the Hwk1 submission folder on hedwig, following the instructions detailed in Lab A. You will need to connect to the network drive to do this. Make sure you upload your work to the correct folder!. You should upload your LetterSet.java file, and the completed README.txt.

The homework is due at midnight on Mon Jan 27.

Extensions

A good practice exercise would be to write an interactive tester--a program that lets the user input words (via the Scanner) and then displays the Letter Sets. You can also give the user the option to manipulate LetterSets--for example, to create new ones and add or subtract them.

Can you write a simple program using this class to check if two words are anagrams of each other? Think about what will happen if you subtract their LetterSets!

Grading

This assignment will be graded based on approximately the following criteria: