Write a spell checking program (java) which uses a dictionary of words (input by the user as a string) to find misspelled words in a second string, the test string. Your program should prompt the user for the input string and the dictionary string. A valid dictionary string contains an alphabetized list of words.
Functional requirements:
In: Computer Science
Computer Architecture
1. Define what a "word" is in computer architecture:
2. What is the difference between a register’s width and a register’s address? (choose all that apply - there may be more than one correct answer)
3. Which of the following is NOT implemented by the Program Counter?
4. What is the relationship between the size of the address (number of bits) and the word size for memory registers?
In: Computer Science
Write a Java program that prompts the user to input a word (String).
The program must print the reversed word with all consecutive duplicate characters removed.
The program must contain the following classes: -
The StackX class (you can use the Java Stack class). - The Reverse class which must contain a private data field called “word” of type string, a constructor, and a void method called revNoDup(). The revNoDup() method must reverse the word and remove the consecutive duplicate characters. The revNoDup() method must print the new word (i.e. reversed with consecutive duplicate characters removed). The revNoDup() method must use a Stack to reverse the word and remove the duplicate characters. - The Test class which must contain the main() method. In the main() method, you must prompt the user to input a word (String), create an object from class Reverse, and call the revNoDup() method.
Here is a sample run:
Enter a word:
Tomorrow
woromoT
In: Computer Science
17) Refer the previous question: The following table gives the common disorders, problems and complaints associated with each body system and its components relevant to the nursing care you might provide for your clients in the Australian health care system. Complete the following table with regard to its definition, pathophysiology, signs and impact of specific health procedures(in 10-20 words each). DISEASES AFFECTING THE MUSCULOSKELETAL SYSTEM Gout Gout
17.1) Definition Minimum word required : 10 Word count
17.2) Briefly outline the pathophysiology Minimum word required : 10 Word count
17.3) List four specific signs Minimum word required : 10 Word count
17.4) Impact of allopurinol on patients with gout. Minimum word required : 10
In: Nursing
Pig Latin is a language constructed by transforming English words. The following rules are used to translate English into Pig Latin:
*If the word begins with a consonant, then all consonants at the beginning of the word, up to the first vowel are removed then added to the end of the word, followed by “ay”. For example, “computer” becomes “omputercay” and “think” becomes “inkthay”.
*If the word begins with a vowel, then “way” is added to the end of the word. For example, “algorithm” becomes “algorithmway” and “office” becomes “officeway”.
*If the word ends in a punctuation mark, then the punctuation mark should remain at the end of the word after the transformation has been performed. For example, “science!” should become “iencescay!”. You can assume that the punctuation mark is only a single character. The program reads a line of text from the user and translates it into Pig Latin and displays the result.
This is in python.
In: Computer Science
Name your c++ file Word_LastNameFirstName.cpp. Create a struct that has a word and the length of the word. Next, use the struct to store the word read from a text file call “word.txt” and the length of the word. Print out the word x number of times based on the length of the word as shown below. Also, print a statement with the length and determine if the string length has an odd number or even number of characters. You need to create your own text file and place in the proper folder.
For instance, if the file contains the string "Program", its length is 7, 7 is a odd number and it will be printed 7 times like the below. Print to the console like below
OUTPUT :
Program
Program
Program
Program
Program
Program
Program
The word "Program" has a length of 7 and has an odd number of character
In: Computer Science
Create a Visual Studio console project named exercise101. The main() function should prompt for the name of a text file located in the same directory as exercise101.cpp, and search for a word in the text file as follows:
Enter text file name:
Enter search word:
The program should print the number of occurrences of the word in the file:
occurrences of were found in If the file could not be opened then display:
File not found Use Stream file I/O as a guide to opening and reading a stream input file.
You should read the file word by word, where a word is a set of characters preceded and followed by white space including newlines.
Test you program by searching for the word "government" in the usdeclar.txt file available in Files / Source code / Exercise 10.1 Upload your exercise101.cpp source file to Canvas.
In: Computer Science
In: Computer Science
In this assignment you will be implementing a function that will find all single-word anagrams given a single word and a list of all words. In the starter code you will the starting source file anagram.cpp and the list of words wordlist.txt. You will need to implement the anagram() function which takes a string for the word to find anagrams of as the first parameter and a vector of strings containing a list of all words as the second parameter. The return value of anagram() will be a vector of strings containing all anagrams (including the parameter word if it is an actual word). There is a main function that will test the anagram() function as well as an already-implemented function loadWordlist() which will read in words from the specified file with the format by string-type parameter and return these words in a vector of strings. The anagram() function will take a word (string) and a wordlist of all words (vector of strings) and builds a dictionary/map where the key is a specific amount of times each letter occurs in a word and the associated value is a vector of strings containing all words using those letters (anagrams). You may either modify the Stringset class to be a dictionary (holding a key:value pair as opposed to just a key) or use the STL unordered_map structure. The main() function provided will test the anagram() function with a word the user types in using the words stored from wordlist.txt in wordlist, for example if the user types in steak, anagrams=anagram("steak",wordlist); will run and if implemented correctly the following contents of anagrams will be displayed:
skate stake steak takes teaks
Submit anagram.cpp with the implemented anagram() function. You are free to implement any helper functions in anagram.cpp.
Anagram.cpp:
#include
#include
#include
#include
using namespace std;
vector loadWordlist(string filename);
vector anagram(string word, vector wordlist);
int main()
{
vector words;
vector anagrams;
string inputWord;
words=loadWordlist("wordlist.txt");
cout << "Find single-word anagrams for the following word:
";
cin >> inputWord;
anagrams = anagram(inputWord, words);
for (int i=0; i {
cout << anagrams[i] << endl;
}
return 0;
}
vector loadWordlist(string filename)
{
vector words;
ifstream inFile;
string word;
inFile.open(filename);
if(inFile.is_open())
{
while(getline(inFile,word))
{
if(word.length() > 0)
{
words.push_back(word);
}
}
inFile.close();
}
return words;
}
vector anagram(string word, vector wordlist)
{
}
Stringset Class:
class Stringset
{
private:
vector<list<string>> table;
int num_elems;
int size;
public:
Stringset();
vector<list<string>> getTable() const;
int getNumElems() const;
int getSize() const;
void insert(string word);
bool find(string word) const;
void remove(string word);
};
In: Computer Science
Write a program that translates an English word into a Pig Latin word. Input ONE, and ONLY one, word from the user, and then output its translation to Pig Latin.
The rules for converting a word to Pig Latin follow.
Use at least the REQUIRED METHODS listed below, with the exact same SPELLING for method names and parameters.
Input Specification
Input ONE English word as a string. If multiple words are entered ignore any beyond the first.
Use PRECISELY the format below with the EXACT same SPACING and SPELLING.
Please enter a word ==>
Output Specification
Output an introductory message, a prompt for the English word, and a translation for the inputted word.
Use PRECISELY the format below with the EXACT same SPACING and SPELLING. The output below assumes the user entered "Hunger".
This program will convert an English word into Pig Latin. Please enter a word ==> Hunger "Hunger" in Pig Latin is "unger-Hay"
Required Methods
// Prompt and read a word to translate public static String readWord (Scanner console) // Convert a word to Pig Latin and return it public static String convertWord (String englishWord) // Return true if "c" is a vowel, false otherwise. // Handle both lowercase and uppercase letters. public static boolean isVowel (char c) // Print result of translation public static void printResult (String englishWord, String pigLatinWord)
Hints
BEFORE you start coding, think about which methods each method will call. Which methods should "main" call? Create a diagram which shows the calling relationships.
There are many useful String methods listed HERE. You may find startsWith and charAt helpful.
Style
Write comments
In: Computer Science