In: Accounting
A psychologist would like to examine how the rate of presentation affects people’s ability to memorize a list of words. A list of 20 words is prepared. For one group of participants the list is presented at the rate of one word every ½ second. The next group gets one word every second. The third group has one word every 2 seconds, and the fourth group has one word every 3 seconds. After the list is presented, the psychologist asks each person to recall the entire list. The dependent variable is the number of errors in recall. The data from this experiment are as follows:
|
½ Second |
1 Second |
2 Seconds |
3 Seconds |
|
4 |
0 |
3 |
0 |
|
6 |
2 |
1 |
2 |
|
2 |
2 |
2 |
1 |
|
4 |
0 |
2 |
1 |
Step by step on SPSS
a. Can the psychologist conclude that the rate of presentation has a significant effect on memory? Test at the .05 level.
b. Use the Tukey HSD test to determine which rates of presentation are statistically different and which are not.
In: Math
this lab, you will write a shell script, called compare_cols.sh. This program should
one two three,four five,six seven,eight,nine six ten,eleven
Bashscript
In: Computer Science
Use C++
The ADT UnsortedType List function ‘DeleteItem(ItemType item)’ creates an endless loop error when trying to delete a word or key that is not in the list.
Example: Delete the word “letter” from the unsorted list.
Here are the lists contents before the DeleteItem(ItemType item) call:
super formula travel free thick Josephine Clara education
The question is ‘how can I exit gracefully from the DeleteItem(itemType Item) call when the word or key is not in the unsorted list and not get an endless loop but instead printing out a message that the word ‘letter’ is not in the loop? What code can be added?
void UnsortedType::DeleteItem(ItemType item)
{
NodeType* location;
NodeType* tempLocation;
location = listData;
if (item.ComparedTo(location->info) == EQUAL)
{
tempLocation = location;
listData = listData->next;
}
else
{
while (!((item.ComparedTo((location->next)->info) == EQUAL)))
location = location->next;
tempLocation = location->next;
location->next = (location->next)->next;
}
delete tempLocation;
length--;
}
In: Computer Science
Write a C program
A simple method for encrypting data is that of ROT 13. The method takes each latin letter of plain text
and moves it to the next letter 13 times in latin alphabet (wrapping around if necessary). For those of
you who are unaware the latin alphabet is the following
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
This means the letter ‘a’ would become the letter ‘n’. The word “hello” would become “uryyb”. To
recover the original text you only need to apply ROT 13 to the encrypted text. The word “uryyb” under
ROT 13 becomes “hello”. Due to the simplicity of the encryption this method is no longer used in
practice.
Problem
For the first homework assignment of the semester you are to implement a similar encryption scheme
called ROT 13.5. In this encryption scheme whenever you encrypt a vowel (a, e, i, o, u) as plain text,
the next encrypted letter moves to the next letter 14 times in the latin alphabet. In all other cases a plain
text letter will be moved to the next letter 13 times. This means that the word “hello” becomes “urzyb”
under rot 13.5.
Input Specification
Input will start with a single positive integer n (n < 10). The next n lines contains a single word
consisting of lower case latin letters (no more than 100 characters in length). No extra whitespace will
be present.
Output Specification
For each word given in input your program is to output a line containing ONLY the word encrypted as
ROT 13.5 with no extra whitespace or characters in lowercase latin characters.
In: Computer Science
I am having trouble with a C++ code that I'm working on.
It is a spell checker program.
It needs to compare two arrays, a dictionary, and an array with misspelled strings that are compared to the strings in the dictionary. the strings that are in the second array that is not in the Dictionary are assumed to be misspelled.
All of the strings in the dictionary are lowercase without any extra characters so the strings that are passed into the second array must be cleaned of !@#$%^&*()_-+={}[]:;"'`<>,.?/|\ and made to be lowercase before the array is compared to the dictionary.
The algorithm for the main driver should go (something) like this (you are free to adjust this algorithm as needed):
Prompt the user for the name of the file containing the dictionary of correctly spelled words.
Read in the name of the given dictionary file.
Open an input file stream associated with this filename.
If the file associated with filename successfully opens:
For each word in the dictionary file:
Add the word to a “dictionary” LinkedSet.
Close the dictionary file.
Do while the user wants to spell check more files:
Prompt the user for the name of a file to spell check.
Read in the name of the given file.
Open an input file stream associated with this file.
If the file successfully opens:
For each word in the file:
Clean the word of extraneous characters.
Convert the word to lowercase.
Add the word to a “fileBeingSpellChecked” LinkedSet.
Close the file being spell checked.
Create a “difference” LinkedSet that holds the difference between the “fileBeingSpellChecked” set and the “dictionary” set (note that the “difference” set will contain only misspelled words).
Display the contents of the “difference” LinkedSet.
Clear the contents from the “fileBeingSpellChecked” LinkedSet.
Clear the contents from the “difference” LinkedSet.
Prompt the user whether they want to spell check another file.
Get their response.
Quit.
In: Computer Science
C++ language
You will create a Hangman class.
Possible private member variables:
int numOfCharacters; //for the secret word
char * secretWord;
char *guessedWord;
public:
//please create related constructors, getters, setters,constructor()
constructor()
You will need to initialize all member variables including the two dynamic variables.
destructor()
Please deallocate/freeup(delete) the two dynamic arrays memories.
guessALetter(char letter)
1.the function will check if the letter guessed is included in the word.
2. display the guessed word with related field(s) filled if the letter guessed matches the some of the letters of the word
gameResult()
1. Display how many times guessed so far
2. Display how many times with the wrong letter guessed3. Display "you win" if all letters are filled in the guess word4. Display "you lost" if the times of guessing the wrong letter reaches 6 (Note: 6 body parts - head, body, left arm, right arm, left leg, right leg)
main()
Instantiate an object of Hangman.Ask the host: how many letters in the guess word.
Ask the host: what is the guess word?
Design a loop for the player to play the guess game
1. The loop should exit if the number of wrong guess reaches 6
2. inside the loop, there should be a condition to allow the player to exit, say "Do you want to continue playing (y|n)?". If the user chooses 'n', exit the loop.
3. Inside the loop, you may do some function chaining calls, something like:
obj.guessALetter(guessLetter).gameResult()
In: Computer Science
Code in Java, Use both Set and TreeSet in only one main to show the differences between the Set and TreeSet that Set still remove the duplicate but won't sort the elements.
Create a class named DictionaryWord as:
|
DictionaryWord |
|
- word: String
|
|
+ DictionaryWord (String word, String meanings) |
Write a program with the following requirements:
Creates 8 DictionaryWord objects with:
|
word |
meanings |
|
bank robber |
Steals money from a bank |
|
burglar |
Breaks into a home to steal things |
|
forger |
Makes an illegal copy of something |
|
hacker |
Breaks into a computer system |
|
hijacker |
Takes control of an airplane |
|
kidnapper |
Holds someone for ransom money |
|
mugger |
Attacks and steals money from someone |
|
murderer |
Kills another person |
Displays all DictionaryWord with the format as:
---------- Set -----------------
<.<>
<>
<.<>
<>
----------- TreeSet ------------
<.<>
<>
<.<>
<>
Where: <>=1,2…
Hint:
In: Computer Science
Code in Java, Use both Set and TreeSet to show the differences between the Set and TreeSet that Set still remove the duplicate but won't sort the elements.
Create a class named DictionaryWord as:
|
DictionaryWord |
|
- word: String
|
|
+ DictionaryWord (String word, String meanings) |
Write a program with the following requirements:
Creates 8 DictionaryWord objects with:
|
word |
meanings |
|
bank robber |
Steals money from a bank |
|
burglar |
Breaks into a home to steal things |
|
forger |
Makes an illegal copy of something |
|
hacker |
Breaks into a computer system |
|
hijacker |
Takes control of an airplane |
|
kidnapper |
Holds someone for ransom money |
|
mugger |
Attacks and steals money from someone |
|
murderer |
Kills another person |
Displays all DictionaryWord with the format as:
---------- Set -----------------
<.<>
<>
<.<>
<>
----------- TreeSet ------------
<.<>
<>
<.<>
<>
Where: <>=1,2…
Hint:
In: Computer Science
A concordance is a table that tells how often a word appears in a text (or where in a text it appears; but we are not using this definition).
You are going to write a program for a concordance that:
The next step in writing this program is to write the Concordance class with:
To simplify the assignment, assume that a word is any collection of consecutive characters separated by white space.
Your input should be a text file (or equivalent) and your output should be a listing of the words (in alphabetical order) and the number of times that they appear in the input.
You will submit a program listing (properly commented), your sample document (at least 40 lines of text) and the print-out.
In: Computer Science