Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Program must be written in Java. This program will read a text file that contains several words and use a method to check if see

Program must be written in Java.

This program will read a text file that contains several words and use a method to check if see any of the words are anagrams. If the words are anagrams then it will print out those words together. This program is a modification of this problem:

Two words are anagrams if they contain the same letters in the same frequency. For instance, stale and least are anagrams of each other. A simple way to check this is to sort the characters in each word; if you get the same answer (in the example, we get aelst), the words are anagrams of each other. Write a method that tests if two words are anagrams of each other.

Sample Input: Dictionary.txt

a aardvark aardwolf ab aba abaca abacist aback abactinal abacus abaddon abaft abalienate abalienation abalone abampere abandon abandoned abandonment abarticulation abase abased abasement abash abashed abashment abasia abasic abate abatement abating abatis abatjour abattis abattoir abaxial abba abbacy abbatial abbatical abbatis abbe abbess abbey abbot abbreviate abbreviated abbreviation abbreviature abc abcoulomb abdal abderite abdicable abdicant abdicate abdication abdicator abditory abditos abdomen abdominal abdominocentesis abdominoscope abdominoscopy abdominous abdominousness abdominovesical abduce abducent abduct abduction abductive abductor abeam abecedarian abecedarius abecedary abed abel abelia abelmoschus abelmosk abends aber aberdeen aberdevine aberrance aberrant aberration abest abet abetalipoproteinemia abetment abettor abeunt abeyance abeyant abfarad abhenry abhor abhorrence abhorrent abhorrer abibis abidance abide abiding abidjan abience abient abies abigail abiit abilities ability abiogenesis abiogenetic abiogenist abiotrophy abito abject abjection abjectly abjectness abjunction abjuration abjurationabjurement abjure abkari ablactation ablated ablation ablative ablaut ablaze able ablebodied ablegate ableism ableness ablepharia ablepsia ablepsy abloom ablude ablution ablutionary abnaki abnegation abnegator abnormal abnormality abnormalize abnormally abnormis abnormity abnormous aboard abocclusion abode abodement aboding abohm aboideau abois aboiteau abolengo abolish abolishable abolishment abolition abolitionary abolitionism abolitionist abolitionize abomasal abomasum abominable abominate abomination abominator aborad aboral abord aboriginal aborigine aborigines aborning abort aborticide abortifacient abortion abortionist abortive abortively abortus abound abounding about abouts above aboveboard aboveground abovementioned abovesaid abovestairs abra abracadabra abrachia abrade abraded abrader abraham abramis abranchiate abrasion abrasive abreast abrege abreption abridge abridged abridger abridgment abroach abroad abrocoma abrocome abrogate abrogated abrogation abronia abrupt abruption abruptly abruptness abruzzi abscess abscessed abscind abscision abscissa abscission abscond absconder abscondment absence absens absent absentee absenteeism absently absentminded absentmindedness absento absents absinth absinthe absolute absolutely absoluteness absolution absolutism absolutist absolve absolved absolver absolvitory absolvitur absonant absonous absorb absorbable absorbate absorbed absorbefacient absorbency absorbent absorber absorbing absorption absorptivity absquatulate abstain abstainer abstemious abstemiously abstemiousness abstention absterge abstergent abstersion abstersive abstinence abstinent abstract abstracted abstractedly abstractedness abstraction abstractionism abstractionist abstractive abstractly abstractness abstractor abstruse abstrusely absurd absurdity absurdly absurdness absurdum abudefduf abulia abulic abuna abundance abundant abundanti abundantly abuse abused abuser abusive abusively abut abutilon abutment abuttal abutter abutting abuzz abvolt abwatt aby abysm abysmal abyss abyssal abyssinian ac acacia academia academic academical academically academician academicianship academist academy acadia acadian acalypha acanthaceae acanthisitta acanthocephala acanthocephalan acanthocereus acanthocybium acanthocyte acanthocytosis acanthoid acantholysis acanthoma acanthophis acanthopterygii acanthoscelides acanthosis acanthotic acanthuridae acanthurus acanthus acapnic acapulco acardia acariasis acariatre acaricide acarid acaridae acarina acarine acaritre acarophobia acarpelous acarpous acarus acatalectic acataphasia acathexia acathexis acaudate acaulescent accedas accede accelerando accelerate accelerated accelerating acceleration accelerative accelerator accelerometer accension accent accented accentor accents accentual accentuate accentuation accept accepta acceptability acceptable acceptably acceptance acceptation accepted accepting acception acceptive acceptor access accessible accession accessional accessorial accessory acciaccatura accidence accident accidental accidentally accidentalness accidents accipere accipient accipiter accipitres accipitridae accipitriformes accipitrine acclaim acclamate acclamation acclimatization acclimatize acclivitous acclivity acclivous accloy accolade accommodate accommodating accommodation accommodational accommodative accomodation accompanied accompaniment accompanist accompany accompanying accompli accomplice accomplish accomplishable accomplished accomplishment accomplishments accompts accord accordance accordant accordian according accordingly accordion accordionist accost accouchement accoucheur accoucheuse account accountability accountable accountableness accountancy accountant accountantship accounter accounting accounts accouple accouplement accousente accouter accoutered accouterment accouterments accoy accra accredit accreditation accredited accretion accretionary accretive accrimination accroach accrue accrued accrust accubation accueil accultural acculturation acculturational accumbent accumulate accumulated accumulation accumulative accuracy accurate accurately accurse accursed accusable accusation accusative accusatorial accusatory accuse accused accuser accusing accusingly accustom accustomary accustomed ace acebutolol aceite aceldama acentric acephalia acephalous acequia acequiador acequiamadre acer aceraceae acerate aceration acerb acerbate acerbic acerbity acerola acervate acervatim

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions