Standard tricks of cryptic crossword

Assignment Help Software Engineering
Reference no: EM13295885

1. Letter Patterns

You cannot work out the clue but know a number of letters because of other words intersecting with the one you want to figure out.

For example, the clue might be "left handed" and you know the following pattern of letters

_O_T_P_W

The underscore represents the letters you don't know. See if you can figure it out. The answer is given further down.

2. Anagrams

In cryptic crosswords you have to decipher the clue to determine the word. One of the standard tricks of cryptic crossword creators is to use anagrams. That is, taking a word or set of words and rearranging the order to get a new word.

For example

Gale is going haywire with the fodder storage (6)

The (6) says the answer is a single word 6 letters long. The hint here is the word "haywire", which is indicating we have to shuffle letters around to get the answer. "Gale is" is six letters long and an anagram of that is "silage", which is the storage of grain and fodder. We have our answer.

Unfortunately, it can often be quite difficult to work out the anagram if it uses a lot of letters and the word we want is obscure.

STARTING THE PROGRAM

Your program must use command line arguments. Assuming your program has been compiled to Crossword.exe you would run with the following command line arguments.

Crossword [A|P] dictionary letters

[A|P]

This says we must either supply the letter A or the letter P as part of the command line arguments.

A We are looking for words in the dictionary that are an anagram of the letters supplied.
P We are looking for words in the dictionary that match the pattern of letters supplied.

dictionary

In order to solve the problem you will need a dictionary of words to check your letters against, looking for possible matches. The dictionary will have one word per line of file. As part of the assignment I will supply a dictionary file called dict.txt, which contains about 64000 words to test against. It can be assumed that the dictionary only contains alphabetical letters. It contains no spaces, digits or punctuation characters.

letters

Letters can be in two forms

1. A set of alphabetical letters. It contains no spaces, digits or other punctuation characters. The letters can be any case. This will be used with the A argument. Your program will find all words in the dictionary that are an anagram of the letters.

2. A set of alphabetical letters and underscores. It contains no spaces, digits or other punctuation characters. The letters can be any case. This will be used with the P argument. Your program will find all words in the dictionary that match the pattern of letters.

OUTPUT

The program will output all the words it finds matching the pattern/anagram plus a count of the words found.

Example 1

Crossword P dict.txt _O_T_P_W

Will produce the following output

southpaw

Number of matching words found = 1

Example 2

Crossword P dict.txt _e___se

Will produce the following output

because
decease
defense
despise
genoese
genoise
pelisse
pentose
recluse
relapse
release
remorse
reprise
repulse
reverse
ventose
verbose

Number of matching words found = 17

Example 3

Crossword A dict.txt arid

Will produce the following output

arid
dari
raid
Number of matching words found = 3

ASSIGNMENT OBJECTIVES

The purpose of this assignment is to demonstrate competence in the following skills.

• Program design
• Array and string manipulation
• NSFoundation classes including NSString, NSNumber, NSArray, NSMUtableArray
• Command line arguments
• File handling
• Creating methods in Objective C
• Creating classes in Objective C

These tasks reflect all the subject objectives.

The solution I have for this assignment takes about 380 lines of code, including white space (blank lines), comments, code that Xcode generates, etc. As part of your subject workload assessment, it is estimated this assignment will take 25 hours to complete.

Reference no: EM13295885

Questions Cloud

Determine the standard free energy of dissolution of glucose : The concentration of the saturated solution of glucose in water is 4.0 M under standard conditions. Find the standard free energy of dissolution of glucose
Determine the saturated reactance in per unit : The armeture leakage reactance is 0.10 per unit on the generator rating as abase. Find(a) the unsaturated value of the synchronous reactance inohms per phase and per unit, (b) the short-circuit ratio, and (c)the saturated reactance in per unit and..
What is the magnitude of the boys acceleration : a 26.5 kg boy slides down a steep slide at a water park that is 10.9 m long and angled 75 degrees above the ground. what is the magnitude of the boys acceleration as he travels down the slide
What do you know about the market : A stock market analyst is able to identify mispriced stocks by comparing the average price for the last 10 days to the average price for the last 60 days. If this is true, what do you know about the market?
Standard tricks of cryptic crossword : Cryptic crosswords you have to decipher the clue to determine the word. One of the standard tricks of cryptic crossword creators is to use anagrams.
Explain how a long-term bond price is impacted in opposite : Explain how a long-term bond's price is impacted in opposite directions when the required rate of return on the bond rise.
How to calculate the free energy change for transferring : Calculate the free energy change for transferring 1 mol of sodium ions from outside to inside of the cell at the pysiological temperature of 310 K.
Calculate the max torque in newton-meters and power output : The rotor winding consists of 55 turns per pole with a winding factor ofKr=0.89. The peak value of a fundamental air-gap flux densityis limited to 1.0T and the rotor winding current to 2900A.C
Declaration of independence-theory of government : The Declaration of Independence is based on which theory of government?

Reviews

Write a Review

Software Engineering Questions & Answers

  Investigate and analyse the effect of applying cmmi practice

ITECH3501- 6501 Principles of Software Engineering:  Investigate and analyse the effect of applying CMMI practices/processes in an Agile environment in terms of business performance improvement and the limitations/restrictions of using both, and writ..

  Information flow complexity

Cyclomatic complexity, monitoring devices, wireless dial-out device with controller, Request for Proposals (RFPs), Weighted IFC

  Tcp sender and receiver sequence

Think about a TCP sender and receiver. Suppose bytes 0 .. 99 have been sent, received, and acknowledged (the sender has received ack's for them). Suppose the sender sends the following segments

  Design algorithm to find clique in graph

Design an O(n9) algorithm to find a 9-clique in G, if such clique exists; answer "no such a clique" if it does not exist. Please describe your algorithm and sketch its correctness. Pseudocode is NOT required.

  Linear-time algorithm-find odd-length cycle-directed graph

Give a linear-time algorithm to find an odd-length cycle in a directed graph. You may NOT assume that the graph is strongly connected.

  Question related to inheritance

Inheritance is a method in object oriented programming in which you derive new classes from existing classes in your code. Explain why might this be useful?

  Analyzing code snippet

Analyze the code snippet and describe why it will work or why not it will not. Code required to make this a complete program intentionally left out.

  Develop user acceptance tests for the review

Develop User Acceptance Tests for the Review Content Query use case text description and create bug reports for any bugs you have identified in your executed tests.

  Explain the function of input controls

Explain the advantages and disadvantages of restricting user interfaces. (User interfaces can often be restricted, limiting the user's ability to navigate to other areas of the system, or out of the system.)

  Create risk management policy to addresse security breaches

Oorganization which permitted unauthorized individual access to valuable data. Your job is to create risk management policy that addresses the two security breaches and how to mitigate these risks.

  Determine its model for attorney of clients for each case

Attorney is retained by one or more clients for each case, a client may have more than one attorney for each case. Determine its model.

  Content validation of document

Do you believe that any form of document content validation should be applied to web pages before they are placed in the public domain?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd