Please answer! This assignment is due in an hour.
When choosing an item from a group, researchers have shown that an important factor influencing choice is the item's location. This occurs in varied situations such as shelf positions when shopping, filling out a questionnaire, and even when choosing a preferred candidate during a presidential debate. In this experiment, five identical pairs of white socks were displayed by attaching them vertically to a blue background that was then mounted on an easel for viewing. One hundred participants from the University of Chester were used as subjects and asked to choose their preferred pair of socks. In choice situations of this type, subjects often exhibit the "center stage effect," which is a tendency to choose the item in the center. In this experiment, 34 subjects chose the pair of socks in the center. Are these data evidence of the "center stage effect"? Follow the four-step process (Hint: if subjects are choosing a pair of socks at random from the five positions, what would be the probability of selecting the pair in the middle? This is the value of p in the null hypothesis).
In: Math
LiOH(s) + CO2(g) → Li2CO3(s) + H2O(l) If 92.4 grams of lithium hydroxide reacts with excess carbon dioxide, what mass of lithium carbonate will be produced?
In: Chemistry
Premier Consulting’s two consultants, Avery and Baker, can be scheduled to work for clients up to a maximum of 160 hours each over the next four weeks. A third consultant, Campbell, has some administrative assignments already planned and is available for clients up to a maximum of 140 hours over the next four weeks. The company has four clients with projects in process. The estimated hourly requirements for each of the clients over the four-week period are as follows:
Client Hours
A 180 B 75 C 100 D 85
Hourly rates vary for the consultant–client combination and are based on several factors, including project type and the consultant’s experience. The rates (dollars per hour) for each consultant–client combination are as follows:
Client
Consultant A B C D
Avery 100 125 115 100
Baker 120 135 115 120
Campbell 155 150 140 130
a. Develop a network representation of the problem.
b. Formulate the problem as a linear program, with the optimal solution providing the hours each consultant should be scheduled for each client to maximize the consulting firm’s billings. What is the schedule and what is the total billing?
c. New information shows that Avery doesn’t have the experience to be scheduled for client B. If this consulting assignment is not permitted, what impact does it have on total billings? What is the revised schedule? I NEED EXCEL FILE THAT HAS SPREAD SHEET AND SENSITIVITY REPORT to solve this problem
In: Math
JAVA PLEASE
Creating Classes
Create a class that will keep track of a yes/no survey. You will have to store the text (question) of the survey plus the number of yes/no votes. The constructor requires a description of the survey to be passed int (the question). The vote method will simply increment the correct vote count. The toString method will format all of the instance data to be displayed on the screen
In: Computer Science
How many moles of KMnO4 are equivalent to 1.000 mole of Fe2+?
In: Chemistry
How can the corporate culture coordinate with the company to enhance its competitiveness?(450 words and 1 paragraph)
In: Operations Management
In this exercise, weighed samples of a solid unknown containing NaCl and NaHCO3react with hydrochloric acid. The volume of the CO2 liberated by the reaction in the gas phase is measured with a gas collection syringe. From the volume we can calculate the number of moles of CO2 in the gas phase using the ideal gas approximation.
Since the CO2 is generated in an aqueous environment (aqueous HCl), some CO2will dissolve in the liquid phase. The amount of CO2 dissolved in the liquid phase is computed using Henry's Law which requires knowing the partial pressure of CO2. As described in the exercise, this requires knowing the entire system gas volume in addition to the initial and final syringe readings.
The entire system gas volume is the sum of the quantities labeled Vtube and Vsyr in the diagram below, corrected for the liquid volume (the aqueous HCl).
| Value | Units | |
| Gas Constant | 0.0821 | L-atm/mol K |
| Absolute Zero (0 K) | -273.15 | oC |
| Atmosphere | 760.0 | Torr |
| Molar Mass of NaHCO3 | 84.01 | g/mol |
| Henry's Law Constant for CO2in water | 3.2 X 10-2 | mol/L-atm |
The table below contains the data collected in one run of the reaction between an unknown and hydrochloric acid:
| Value | Units | |
|
Initial Weight of container and unknown |
18.4395 | g |
| Final Weight of container and unknown | 18.6185 | g |
| Volume of hydrochloric acid | 10.0 | mL |
| Volume of tube, Vtube (see Figure above) | 92.3 | mL |
| Initial volume of syringe | 5.0 | mL |
| Final volume of syringe | 50.7 | mL |
| Temperature | 26.5 | oC |
| Pressure | 764.4 | Torr |
| Vapor Pressure of Water at 26.5 oC | 25.8 |
Torr |
The following questions deal with the above data. The appropriate units are specified in the questions. Pay close attention to the number of significant figures in your answers.
1). What is the volume of CO2 captured in the gas phase (in mL)?
2).What is the number of mmols of CO2 captured in the gas phase? (Remember to account for the vapor pressure of water.)
3). What is the weight of the sample in grams?
In: Chemistry
strlen():
strlen() counts the number of characters in a cstring. The algorithm works by looking at each character in the cstring, counting as it goes. It stops looking at characters when it encounters a null terminator ‘\0’.
Here is my implementation of the strlen() function. You will need to write and test my solution and your own solution.
int profStrLen( char *str ) {
char *endOfStr = str;
while( *endOfStr != '\0' ) {
endOfStr++;
}
return (int)(endOfStr - str);
}
Make sure you understand how my implementation is working before creating your own. Then, you can write your own implementation. For your implementation, do not use pointer arithmetic to solve it - use array notation and a counter instead. Here is the prototype for your function.
int stuStrLen( char * );
strcpy():
strcpy() copies the contents of the second char* into the memory of the first char*. The algorithm works by looking at each character in the second char* and copies that into the first char*. Because we are dealing with cstrings, the copying process will stop when the ‘\0’ is reached in the second char*.
Here’s my implementation. Again, you will need to write and test my solution and your own.
char *profStrCpy( char *str1, char *str2 ) {
char *dest = str1;
while( *str2 != '\0' ) {
*str1 = *str2;
str1++;
str2++;
}
*str1 = ‘\0’;
return dest;
}
Make sure you understand how my implementation is working before creating your own. Then, you can write your own implementation. For your implementation, do not use pointer arithmetic to solve it - use array notation and a counter instead. Here is the prototype for your function.
char *stuStrCpy( char *, char * );
strcat():
strcat() copies the contents of the second char* into the memory of the first char* like strcpy(), but it copies the values in the second char* to the end of the first char*. The algorithm works by looking at each character in the first char* until the ‘\0’ is found. Then, it looks at each character in the second char* and copies that into the first char*’s current location. As it does this, it increments the position in each char* until the ‘\0’ is found in the second char*.
Here’s my implementation. Again, you will need to write and test my solution and your own.
char *profStrCat( char *str1, char *str2 ) {
char *dest = str1;
while( *str1 != '\0' ) {
str1++;
}
while( *str2 != '\0' ) {
*str1 = *str2;
str1++;
str2++;
}
*str1 = ‘\0’;
return dest;
}
Make sure you understand how my implementation is working before creating your own. Then, you can write your own implementation. For your implementation, do not use pointer arithmetic to solve it - use array notation and a counter instead. Here is the prototype for your function.
char *stuStrCat( char *, char * );
Intermediate cstring function
Now that you have worked through many of the cstring functions. I want you to implement the following functions on your own. I will provide an overview of the algorithm, but I will not provide you with an implementation from me. You will need to write and test this function.
strcmp():
strcmp() compares strings lexicographically. It returns a negative value if the first string occurs lexicographically before the second string. It returns a positive value if the first string occurs lexicographically after the second string. And, it returns zero if the two strings are equivalent. Make sure you call attention to the return of strcmp(). The return of zero instead of a non-zero is a common source for errors involved with cstring processing.
The algorithm for strcmp() works by subtracting each character as it iterates through each cstring stopping when the result of the subtraction is nonzero or a ‘\0’ is found in one of the strings. We will return the difference between the two characters.
You will need to write and test your solution. Here is your prototype.
int stuStrCmp( char *, char * );
Everybody likes a mystery
Here is a function of code that is labeled mystery. Type in the code and describe in the comments what the function does algorithmically and tell me what you think the function is named.
int mystery( char *str ) {
char *str2 = str;
long pos;
int result = 0;
while( *str2 != '\0' ) {
str2++;
}
pos = str2 - str - 1;
for( int count = 1; pos >= 0; pos --, count *= 10 ) {
if( str[pos] == ‘-') {
result *= -1;
} else {
result += (str[pos] - '0') * count;
}
}
return result;
}
main.cpp
#include <iostream>
using namespace std;
int profStrLen( char * );
int stuStrLen( char * );
char *profStrCpy( char *, char * );
char *stuStrCpy( char *, char * );
char *profStrCat( char *, char * );
char *stuStrCat( char *, char * );
int stuStrCmp( char *, char * );
int mystery( char * );
int main() {
// type all testing code here
return 0;
}
// implement the functions here
In: Computer Science
In: Biology
Management Science Bank is the only bank in the small
town of Sto Thomas. On a typical Friday, an average of 10 customers
per hour arrive at the bank to transact business. There is one
teller at the bank, and the average time required to transact
business is 4 minutes. It is assumed that service times may be
described by the exponential distribution. A single line would be
used, and the customer at the front of the line would go to the
first available bank teller. If a single teller is used,
find:
a.) The average time in the line.
b.) The average number in the line.
c.) The average time in the system.
d.) The average number in the system.
e.) The probability that the bank is empty.
f.) Management Science Bank is considering adding a second teller
(who would work at the same rate as the first) to reduce the
waiting time for customers. She assumes that this will cut the
waiting time in half. If a second teller is added, find the new
answers to parts (a) to (e).
In: Operations Management
What is the ultimate fate of the digested chicken and rice? What was the initial biological structure of the nutritional components first consumed (example proteins breaking down to their simpler components) and what are the resulting products resulting from digestion that are now ready and available for use by the body for energy and homeostasis?
In: Chemistry
how do corporations benefit from government regulation?
*refer to Dean Baker's THE CONSERVATIVE NANNY STATE*
In: Economics
##Notice: write in HLA code
.
.
Create an HLA Assembly language program that prompts for a single integer value from the user and prints an boxy pattern like the one shown below. If the number is negative, don't print anything at all.
.
Here are some example program dialogues to guide your efforts:
.
Feed Me: 5
55555
5 5
5 5
5 5
55555
Feed Me: -6
Feed Me: 3
333
3 3
333
.
In an effort to help you focus on building an Assembly program, I’d like to offer you the following C statements matches the program specifications stated above. If you like, use them as the basis for building your Assembly program.
.
SAMPLE C CODE:
------------------------
int i, n, j;
printf( "Feed Me:" );
scanf( "%d", &n );
for (i=1; i<=n; i++) {
if (i == 1 || i == n) { // first or last row
for (j = 1; j <= n; j++) {
printf( "%d", n );
}
printf( "\n" );
}
else { // internal rows of the box
printf( "%d", n );
for (j = 1; j <= n-2; j++) {
printf( " " );
}
printf( "%d", n );
printf( "\n" );
}
}
.
##Answer the questinon in HLA Assembly language program.
In: Computer Science
The water used in this experiment is sparged with nitrogen to remove any dissolved oxygen. The proton-coupled reduction of oxygen is shown in the following half reaction:
O2 + 4H+ +4e- --> 2H2O
1) Explain why sparging a solution with N2 to remove dissolved oxygen is an equilibrium process.
2) Using the half reaction above, write the balanced equation for the reaction of ascorbic acid with oxygen. Show your work.
3) If you didn’t know whether or not O2 is capable of oxidizing ascorbic acid, how would you determine this by consulting data? What data would you consult and what would you look for?
In: Chemistry