{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

AnagramsHandout

AnagramsHandout - Lab 4 Anagrams(CSE 15L Definition An...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lab 4: Anagrams (CSE 15L, October 19, 2011) Definition: An anagram of a word is a new word or phrase that contains all the letters of the original word, using each original letter exactly once. New spaces and punctuation are allowed in the anagram. This lab uses two Java files. The main method is in TestAnagram.java . This calls LetterCount.java to generate a list of anagrams from a vocabulary list (given by the user) and a given root word. In addition to the root word, the user must input an inquiry phrase. The inquiry phrase is checked to see whether it is in the list or not. Program Specification: The program takes three arguments, which are the input file, root word, and inquiry phrase . The program generates internally a list of phrases that are combinations of vocabulary words connected by single spaces. Each phrase is an anagram of the root word ignoring whitespace and non-letter characters. For example, “dirty room!” is an anagram of “dormitory” because “dirty” and “room!” are in the vocabulary fileand “room!...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

AnagramsHandout - Lab 4 Anagrams(CSE 15L Definition An...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online