{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Word - name = theTitle count = theCount public void print...

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

{[ snackBarMessage ]}

Ask a homework question - tutors are online