Word - name = theTitle; count = theCount; } public void...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/*CLASS WORD INSTANCE VARIABLES: THE NAME OF THE WORD AND THE COUNT OF THE NUMBER OF TIMES THE WORD APPEARS. W */ * public class Word { private String name; private int count; public Word(String theName, int theCount){
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: name = theTitle; count = theCount; } public void print(){ System.out.print(name + " occurs in the text (" + count + " times)"); } }...
View Full Document

This note was uploaded on 06/07/2010 for the course CS 201 taught by Professor Staff during the Spring '08 term at Iona.

Ask a homework question - tutors are online