In: Anatomy and Physiology
New theories of crime were being studied by psychologists. These theories began to develop in the early 1900s. Your task is to search Biological, Sociological and Psychological Theories of Crime and then you need to write your findings with your own thoughts and words. Your word limit is 750-1000. very long please explain
In: Psychology
In: Psychology
I need a different answer to avoid plagiarism
Question Two: (Word count 200 words) “A system” Name and explain any system that you deal with in real life, in your explanation use all what you have learned about the characteristics of a system, where all parts must be clear and applied.
In: Operations Management
1) Using IEEE 754 format, determine the number this represents:
(64 bits) 0 11000111010 1100110000000100000000000000100000000000000000000000
2) Using complement two:
a) Represent 127
b) 127 – 499
3) How many nibbles can fit in three Word?
4) Using complement one:
a) What number represents 10001111?
In: Computer Science
In: Computer Science
Create Java game on How to play Bulls and Cows between you (the host) and your computer (the player)
When completed, your program allows you to host the game (i.e., you create a secret word and score every guess) and it makes guesses until it wins.
In this player mode, your program should:
1. Display a total count of guesses with a new generated guess, which should be a 5-char string with '@' always included and the rest four characters drawn from any of the below 3 sets
characters:
{A, B, C, D, E}
{ 5, 6, 7, 8, 9 }
{ =, ?, %, @, $ }
2. Wait for a score (e.g., '2Bull, 3Cow') to be returned and entered by the host, who is you. It's suggested the score is entered on the same line of the the count and guess displayed in the above step. So, it would look like
Guess #3 8@XYZ 1Bull, 2Cow
Guess #4 5@WYZ 1Bull, 1Cow
Guess #5 @8=%Z 4Bull, 0Cow
Repeat the above two steps until the guess wins a score of '5Bull, 0Cow' as shown below.
Guess #3 8@XYZ 1Bull, 2Cow
Guess #4 5@WYZ 1Bull1Cow
Guess #5 @8=%Z 4Bull, 0Cow
Guess #6 @8=6Z 5Bull, 0Cow -- You won!!
Except for the very first guess, your program should implement a strategy or formula to generate a new guess based on all scores collected. A good strategy or formula should use as much as possible the information or hints provided by the scores to quickly approach the secret word. This would be the most challenging component to be implemented in the entire program.
Hint: one possible method is to generate a list of all possible secret words (using all scores returned) that could be the next guess, then to prune the list by keeping only those words that would give an equivalent score to how the last guess was scored. Then, the next guess can be any word from the pruned list. Either the guess correctly hits the secret word or run out of words to guess, which indicates a problem with the scoring or a problem with the list itself.
Please, keep in mind that the computer is the player, the one that has to guess the inputted String by the user.
In: Computer Science
Modify this program so that it takes in input from a TEXT FILE and outputs the results in a seperate OUTPUT FILE. (C programming)!
Program works just need to modify it to take in input from a text file and output the results in an output file.
________________________________________________________________________________________________
#include <stdio.h>
#include <string.h>
// Maximum string size
#define MAX_SIZE 1000
int countOccurrences(char * str, char * toSearch);
int main()
{
char str[MAX_SIZE];
char toSearch[MAX_SIZE];
char ch;
int count,len,a[26]={0},p[MAX_SIZE]={0},temp;
int i,j;
//Take user's input
printf("Enter any string : ");
gets(str);
//store length of string
len=strlen(str);
//array "a" contains count of every character
for(i=0;i<len;i++)
{
if(str[i]>='a'&&str[i]<='z')
a[str[i]-'a']++;
}
//output the result
for(i=0;i<26;i++)
{
if(a[i]!=0)
{
ch=i +'a';
printf("%c occurs %d times\n",ch,a[i]);
}
}
//array "p" contains count of length of every word
for(i=0;i<len;i++)
{
temp=0;
while(i<len&&str[i]!=' ')
{
temp++;
i++;
}
p[temp]++;
}
//output the result
for(i=0;i<MAX_SIZE;i++)
{
if(p[i]!=0)
{
printf("Word length %d occurs %d times\n",i,p[i]);
}
}
for(i=0;i<len;i++)
{
memset ( toSearch, 0, MAX_SIZE );
temp=0;
while(i<len&&str[i]!=' ')
{
toSearch[temp]=str[i];
temp++;
i++;
}
count = countOccurrences(str, toSearch);
printf("Total occurrences of '%s' is %d\n", toSearch, count);
}
return 0;
}
int countOccurrences(char * str, char * toSearch)
{
int i, j, found, count;
int stringLen, searchLen;
stringLen = strlen(str); // length of string
searchLen = strlen(toSearch); // length of word to be searched
count = 0;
for(i=0; i <= stringLen-searchLen; i++)
{
/* Match word with string */
found = 1;
for(j=0; j<searchLen; j++)
{
if(str[i + j] != toSearch[j])
{
found = 0;
break;
}
}
if(found == 1)
{
count++;
}
}
return count;
}
In: Computer Science
Problem 2: Universal Product Codes(UPCs) Retail products are identified by their Universal Product Codes (UPCs). The most common form of a UPC has 12 decimal digits: The first digit identifies the product category, the next five digits identify the manufacturer, the following five identify the particular product, and the last digit is a check digit. The check digit is determined in the following way: • Beginning with the first digit multiply every second digit by 3. • Sum all the multiplied digits and the rest of the digits except the last digit. • If the (10 - sum % 10) is equal to the last digit, then the product code is valid. • Otherwise it is not a valid UPC. The expression is: sum = 3.x1 + x2 + 3.x3 + x4 + 3.x5 + x6 + 3.x7 + x8 + 3.x9 + x10 + 3.x11 where the x’s are the first 11 digits of the code. If you choose to add the last digit also in the second step and if the sum is a multiple of 10, then the UPC is valid. Either way, you still need to perform the modular division to check whether the given number is a valid code. In this problem, you need to use either a string or long long integer type for the product code because it is 12 digits long. If you use string, you can convert one character substring of the string in to a single digit integer from left to right using the function stoi(str.substr(i,1)). This way you do not need to get last digit of the number and then divide the number by 10. 1 Problem 3: Translate the following pseudocode for randomly permuting the characters in a string into a C++ program. Read a word. repeat word.length() times Pick a random position i in the word, but not the last position. Pick a random position j > i in the word. swap the letters at positions j and i. Print the word. Please work on this problem after we learn to generate random numbers in the class which is on Wednesday the latest. These problems only deal with simple loop while, for and do loops. You will get a second set of problems next week on nested loops. in loops and string and not fuction that all the info i have
In: Computer Science
IN JAVA
If a list is received for which the last String is in the word list, this method should recursively call itself on a list consisting of all but the last word. If the recursive call returns a String (not null), add the last word back to the end of the String and return it. This method should not contain any loops.
In: Computer Science