An alien spaceship has landed in your backyard full of various
types of aliens. They all are saying “I come in peace”,
but you’re not so sure. You consult your
trusty guide to alien encounters to find out
that that there are three criteria that
determine if an alien is telling the truth:
number of heads, type of weapon and
intensity of their eyes.
Friendly features: squirt gun as weapon
Unfriendly features: weapon (as long as it’s
not a squirt gun), beady eyes, more than two
heads
Don’t ask about the type of weapon if you know the alien does
not have a weapon
If an alien has two or more unfriendly features he is
unfriendly
o So beady eyes, three heads, but no weapon & the alien is an
enemy
o So squirt gun, regardless of other features, the alien is
friendly
Pseudocode (10 points)
Create the document in using Microsoft Office Word or Power Point
or the Open Office equivalent, as
long as I am able to open it.
Start with a pseudocode. Write the pseudocode in English, step by
step what you need to do to solve the
problem. There are many ways this can be done. Take your time and
think about it.
No flowchart is required, but you can certainly draw one if it
helps you.
put your name, date, section, and description of the program at
the top of the page.
save the file lastname_ch3AlienPseudocode
In: Computer Science
Create a program that will prompt for user information for a Web site. Use a structure to store the data. The structure will need to include the following items:
Create a single structure from the items listed above.
Prompt for all items except "Full Name" and load the input directly into a variable based on this structure .
After the data is loaded, pass the structure by reference to a method called "loadFullName". Inside the "loadFullName" method, load the Full Name data item with a string that is a combination of First Name, space, Last Name. The full name must be converted to uppercase. After the loadFullName has executed, display the value of all the data items in the variable structure.
Review of tasks:
a. Create User Structure
b. Assign a Variable to a User Structure
b. Load the Variable Structure Data
c. Pass the Variable Structured Data to "loadFullName"
d. Display the values of the variable structure. Note: Input for a boolean var is 0 for false and 1 for true. Adding this line to display once will help display the word false or true in the output.
std::cout << std::boolalpha;
cout << "is Leasing = " << VarStrucName.isLeasingAutomobile << endl; // will display true or false - with not 0 being true
In: Computer Science
Hi. I am running into trouble solving the problem below and would greatly appreciate a step-by-step explanation on how to arrive at the correct answers and explanations:
SHIELD, Inc., uses a standard costing system and develops its overhead rates from the current annual budget. The budget is based on an expected annual output of 120,000 units requiring 480,000 direct labor hours. (Practical capacity is 500,000 hours.) Annual budgeted overhead costs total $787,200, of which $556,800 is fixed overhead. A total of 119,400 units using 478,000 direct labor hours were produced during the year. Actual variable overhead costs for the year were $230,600, and actual fixed overhead costs were $556,250.
1. Compute the fixed overhead spending and volume variances. How would you interpret the spending variance? Discuss the possible interpretations of the volume variance. Which is most appropriate for this example?
2. Compute the variable overhead spending and efficiency variances. How is the variable overhead spending variance like the price variances of direct labor and direct materials? How is it different? How is the variable overhead efficiency variance related to the direct labor efficiency variance?
Note: please try to give your calculations and explanations on Word or excel sheet as handwriting is sometimes difficult to read.
I would appreciate detailed calculations so I can better understand how to arrive at the correct answer.
In: Accounting
Question 2
Nimbus Inc. makes brooms and then sells them door-to-door. Below you will find the relationship between the number of workers and Nimbus’s output in a given day.
|
Workers |
Output |
Marginal Product |
Total Cost |
Average Total Cost |
Marginal Cost |
|
0 |
0 |
- |
200 |
- |
|
|
1 |
20 |
20 |
300 |
15 |
5 |
|
2 |
50 |
30 |
400 |
8 |
3.33 |
|
3 |
90 |
40 |
500 |
5.56 |
2.5 |
|
4 |
120 |
30 |
600 |
5 |
3.33 |
|
5 |
140 |
20 |
700 |
5 |
5 |
|
6 |
150 |
10 |
800 |
5.33 |
10 |
|
7 |
155 |
5 |
900 |
5.81 |
20 |
please use word to answer the questions. thank you
In: Economics
Why is my C code counter returning the wrong output?
void removeLn(char *tPtr) {
for (; *tPtr != '\0'; tPtr++) {
if (*tPtr == '\n') {
*tPtr = '\0';
}
}
}
This is a method I wrote that essentially replaces the \n in a text
file with a null.
int counter(FILE *filePtr) {
char ln[length];
int counter = 0;
while (fgets(ln, length, filePtr) != NULL) {
char *r;
for (r = ln; *r != '\0';) {
while (isspace(*r)) {
r++;
}
if (*r == '\0') {
break;
} else {
count++;
}
r++;
}
return(counter);
}
}
This function goes through a text file, goes past spaces, stops if
it points to null, increments count for each word in the text file,
and goes until it points to neither a space or a null.
This code is giving me two different outputs. For instance, if a test txt file is 19 characters, if I call it with ./counter and then input the file path, I get 18. However, if I run it ./counter example.txt, I'll get 12. I can't make it out why and where it's wrong. Any help would be a big help...
EDIT: I changed == to = and now both answers are consistent and I am short by 7. 12 is now actual, 19 expected
Example Output:
Why hello there friend.
How are you doing today.
I am doing honestly *very* well,
The sun is coming!
Expected 19
Actual 12
In: Computer Science
A. Organise the items below from superficial to deep. Give a structural description for each.
On a night out with friends at the viaduct, james has too much to drink. He loses his balance and falls, hitting his head on the concrete floor. He is assessed by a paramedic for a possible concussion. Assume normal physiology and anatomy in addressing the specific questions below.
A. Organise the items below from superficial to deep. Give a structural description for each.
Pia mater, skull, arachnoid mater, subarachnoid space, dura mater (meningeal layer), dura mater (periosteal layer)
1.
2.
3.
4.
5.
6.
Deepest
LO3 (word limit for this section: 250)
James fell because he had too much alcohol to drink.
A. Describe the structure of the blood brain barrier and explain how it is supposed to protect the brain.
B. Why did the blood brain barrier not successfully prevent the alcohol from entering into James's brain?
C. What major regions of James's brain would you expect to have been affected by the alcohol to influence his somatic motor function?
In: Anatomy and Physiology
Description: The goal of this assignment is to compare the empirical complexity of two sorting algorithms: a) Heap sort and b) Radix sort.
Instructions:
- Implement the above two sorting algorithms using Java or any other programming language.
- Repeatedly generate random input instances containing 10, 50, 100, 500, 1000, 5000, 10000, 15000, … 50 000. The generated numbers must be between 0 and 100.
- Execute both algorithms to sort the randomly generated arrays.
- Compare the running time of both algorithms and validate their theoretical complexity.
Comment your source code and upload it along with a Word document presenting your results. The report should contain plots illustrating the obtained results and facilitating the comparison of the time complexity of both algorithms.
Hints: The theoretical time complexity for a Heap sort algorithm is O (n log n) and O(d(n+b)) for the Radix sort. As above indicated, b is 10 and d is 3. Considering that configuration, the empirical time complexity of Radix sort should be better than the Heap sort.
Extra: Empirical Study of the impact of d
What if the randomly generated numbers become between 0 and 10 000000 instead of 0-100. Will the Radix algorithm continue to perform better than heap sort? If not, what is the value of d at which Heap sort becomes better than Radix sort. Vary d and re-plot the performance of both algorithms.
In: Computer Science
In the following keypad notation
Use a class and dynamic allocation of a pointer variable to enter the digit code of the following text input
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY
SUNDAY
Use an inherited class using pointer variable to output the phone number from the following text input
1-800-COMCAST
1-800-VERIZON
1-800-BANCORP
1-800-MYKOHLS
1-800-JCPENNY
Write C++ code and pseudocode in a doc file
A computer key board has defect (like speech defect in humans) in reading for ‘p’ /’P’ as ‘f’/’F’ or vice versa and ‘n’/’N’ as ‘l’/’L’ or vice versa
Create a class with pointer variables that would correct the spelling of each word from the Input.txt print them in lexical order in an Output.txt. Write C++ code and pseudocode in a doc file
Input.txt
Pootfath
Pnof
Pullen
Fetan
Ficcadinny
Write a C++ program and algorithm for class a having two matrices one 1x5 and another 5x10 as double pointer to integer variables. Use functions to fill values of the pointer variables and output the multiplication of the two matrices. Using a pointer to integer array variable create a member function to sort the multiplied matrix to increasing order of values. Write C++ code and pseudocode in a doc file
In: Computer Science
A Java program that deciphers each message by building the string. Each line of the text file contains either a word or a command followed by a forward slash and the requirements of the command. A Stack Implementation is needed as. As you read the data from the text file, you need to know if it is a new phrase or command.
The commands are:
i – an insert followed by the letters, numbers, or symbols that need to be inserted into the phrase, followed by the start index where the characters are to be inserted.
d – a delete followed by the start index and end index, deletes all the characters from the start index up to but not including the ending index.
a – an append followed by the letters to be added to the end on the phrase.
u – an undo of the previous instruction (does not undo the instructions p, c, u, or the initial phrase), multiple undo’s in a row are possible.
p – print the current phrase as it is or a completed message after all the instructions.
c – clear the message decoder, to start over with a new phrase and instruction set.
empty line or space – separates each phrase.
Example (txt file):
Hello
a/m
i/p /3
p
d/3/4
u
a/e
d/5/7
p
c
vintage
i/i/4
d/7/8
a/g
p
u
i/e/1
d/2/3
i/n/5
d/6/7
p
c
Output Example:
Help lom
Help Me
Glue
get Blue
In: Computer Science
The company that I have chose is Amazon, the online retail
Instructions
Use the same organization as in previous weeks' projects. Research the ethical challenges regarding employees (i.e., diversity, discrimination, sexual harassment, privacy, employee theft, bad leadership, etc.) that your chosen organization has faced over the past five to ten years and that they should prepare to face in the next five to ten years. Once you have developed a list of challenges, consider how having faced those challenges (or knowing that you will be facing them) will impact and be impacted by the social cause you've selected.
Tasks:
Propose your findings on the ethical challenges faced by your
organization in recent history and the near future. Be sure to:
Analyze ways in which each challenge was (and/or could be) appropriately handled and areas for improvement.
Evaluate the ethical/moral aspects of your organization that protected it from ethical challenges in the past and could protect it in the future.
Assess how ethical challenges and handling of ethical challenges could positively or negatively impact the charitable cause you've selected and how the selection of your social cause could positively or negatively impact the organization and its employees.
Submission Details:
Submit your paper in a 3- to 5-page Microsoft Word document, using APA style.
Name the document SU_BUS3001_W4_LastName_FirstInitial.doc
Submit your document to the Submissions Area by the due date assigned.
In: Operations Management