Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase. For example the anagram of tea is tea, tae, eat, eta, aet, ate.
Anagrams can be used to solve word jumble problems. If a user provides a series of jumbled letters, all anagrams of the letters can be generated and then checked to see if they exist in a dictionary. The anagrams appearing in the dictionary are printed as solutions to the puzzle.

Your task for this assignment is to first write a recursive function to generate anagrams from a series of letters that the user of your program provides via the keyboard. Your program must then look up the anagrams up in a dictionary to see if they exist and print out the list of the dictionary words for each sequence of letters. You should use a hash table with separate chaining as the structure to store the letter sequences and the dictionary words that were found.

You will be asked to hand in your code, your testing files, and your interpretation of your test results.

Getting Started

Search for information on permutations and how to compute permutations.
Set up your assignment folder in the same way as you did for assignment one.
Use the dictionary file that is in the assignment zip file.
Reuse some of your previous data structures modules.
Musts

You must meet the must requirements to get a mark greater than zero. If you do not meet the musts, your assignment will be given a grade of zero.

Your solution must compile, using a makefile, with no errors or warnings and must run without crashing on the SOCS linux computers used for grading.
Your solution must accept a sequence of letters (no shorter than 2, no longer than 10) from the keyboard and print out the number of anagrams for that sequence of letters.
Your solution must successfully load the dictionary file into a hash table and be capable of using the hash table structure to locate a word.
Your submission must have a README.txt file that describes how to run your program as well as any testing programs you write. The readme file must contain a brief description of the hash function you choose to use. The readme file must contain your name and student number.
Shoulds

If you complete all of the Shoulds and all of the Musts, it is possible for your program to receive full marks.

You should use a recursive function to generate the anagrams from the sequence of letters
You should use a hash table with separate chaining as the structure to store the letter sequences and the dictionary words that can be formed from them.
You should print the results of the program, neatly formatted, to the screen and include the total number of anagrams of the letters in the output.
You should be able to correctly find all of the dictionary words for a sequence of letters.
You should have your solution neatly organized into the folder structure discussed in the section on coding conventions for the class. (src/ bin/ include/ docs/)
Won'ts

This assignment is worth 10% of your final grade. It will be marked out of 100 points. No half marks will be given.

Anagram generation
correct generation
recursive function
Dictionary Hash Table
hash table module
hash function
collision resolution
Hash table for words found
hash table module
hash function
collision resolution
User Interface
Input of letter sequences
Output of results
Testing
adequate testing done
program gives correct results
Coding practises
Comments and Source Code (structure, variable and operation naming conventions)
File/folder organization and file naming conventions
Data structures modules reused appropriately

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M9532872

Have any Question?


Related Questions in C/C++

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As