Part I – Frustration
Ellie dropped her backpack beside the chair in Dr. Kern’s office and sat down with a sigh. Her hands trembled as she glanced again at the graded exm in her hand.
“It’s no better than the last one,” she mumbled. “I really, really tried this time, Dr. Kern. I did all the reading assignments before and again after class. I completed all of the study guide questions and rewrote my notes and made flash cards and studied with straight-A Cassie every week. But it didn’t make any difference. I still failed it.” She sniffled loudly and reached for the box of tissues on Dr. Kern’s desk.
Dr. Kern sat back and thought for a moment while Ellie made use of several tissues. Ellie was a junior in Dr. Kern’s physiology course and had struggled from the start of the semester. One-on-one help sessions and different study strategies hadn’t seemed to help. “I know how discouraged you must be, Ellie. Tell me again what you do when you sit down to study.”
“I read and review my class notes and reread the assigned sections in the book. But for some reason I can’t concentrate on much of anything for very long and, even when I can, I don’t remember what I’ve studied
by the next day. It’s so frustrating to spend so much time studying and not retain anything. If I fail this class, my GPA might drop enough that I’ll lose my scholarships. I’m so stressed that I can’t sleep, even when I try.”
Ellie broke off, and Dr. Kern gently tried to encourage her. “Let’s not give up hope yet. Sometimes you have to use new study methods for a while until you start to see some benefits. Let’s also take a look at your exam and see if there’s a pattern in the questions you missed.”
Ellie sniffled again. “OK, but I’m not very hopeful. I’ve been thinking about changing my major. All these upper-level courses seem so hard … there’s so much to learn in such a short time and I just don’t seem to get it even though everyone else does. I can’t stand the stress anymore.”
“Perhaps talking this over with your parents or a trusted friend would help,” Dr. Kern suggested. She noted Ellie’s strikingly large blue eyes that gave her a permanent look of surprise. Ellie was also quite thin, almost to the point of being too thin. Dr. Kern paused and chose her words with care. “I also know there are terrific folks over at the health center who are experts in how to deal with stress.”
Ellie gave a small, noncommittal smile and pushed a shaking hand through her hair. “Thanks, I’ll think about it. See you in class on Monday.”
However, Ellie didn’t come to class on Monday or Wednesday. She emailed Dr. Kern that she most likely had a sinus infection and would miss class on Friday to see a doctor. Dr. Kern shook her head at Ellie’s misfortune; missing a week of class was not going to make it any easier for Ellie to pull up her grade.
In: Biology
A yellow compound is placed on a column and the column is eluted with hexanes. After a large volume of solvent has been collected but the yellow band is still at the top of the column. What should be done to recover the yellow compound? How could this experiment have been done better?
In: Chemistry
After reading Chapter 4 of Shackleton's Way answer the question: How did Shackleton get the best from each individual on his crew?
In: Operations Management
what are 5 entropy sources can be found in house ? and how to reduce the entropy generation of each of the 5 sources .
In: Mechanical Engineering
Two 10-cm-diameter charged rings face each other, 15 cm apart. The left ring is charged to − 30 nC and the right ring is charged to + 30 nC.
What is the magnitude of the electric field E⃗ at the midpoint between the two rings?
What is the direction of the electric field E⃗ at the midpoint between the two rings?
What is the magnitude of the force on a proton at the midpoint?
In: Physics
In: Psychology
JAVA Code
Learning objectives; File I/O practice, exceptions, binary search, recursion.
Design and implement a recursive version of a binary search. Instead of using a loop to repeatedly check for the target value, use calls to a recursive method to check one value at a time. If the value is not the target, refine the search space and call the method again. The name to search for is entered by the user, as is the indexes that define the range of viable candidates can be entered by the user (that are passed to the method). The base case that ends recursion is either finding the value within the range or running out of data to search. The program will work on an array of sorted String objects read in from a text file. Your program will generate an exception, that provides a message to the user, if the file can't be found or if the starting index is after the ending index. You will create your own text file of first names in alphabetical order (binary search required ordering) to test your program.
In: Computer Science
In: Psychology
In: Computer Science
You have recently been asked to leave your current job with a large company so you can run your family business. Many members of your family will rely on that business to pay their bills for the next few years. The company has grown over the past decade and has taken on a significant amount of short-term debt. Your banker paid you a visit to discuss her calculations of various ratios for your business. The banker’s primary concern is whether you’ll have the ability to stay current with short-term debt payments, so she’s most likely to focus on your
|
|||||||||||||||||
|
|||||||||||||||||
|
|||||||||||||||||
|
In: Operations Management
You are to create a program to request user input and store the data in an array of structures, and then display the data as requested. The data you are collecting refers to a set of images. The images are OCT images taken of the lining of the bladder. The data you provide will help diagnose the image as cancerous or not, but your code does not need to do that at the moment.
1) Define a global structure that contains the following information:
a) File number (must be >0)
b) Diagnosis number (1-8)
c) Number of layers in the image
d) Maximum average intensity of a single row (should be a float) e)
Width of brightest layer
2)
be a global variable.
Declare an array of 9 of the structures in #1. This array should
3) Initialize each of the file numbers in the array to -1.
4) Create a loop that will continue asking the user for the above
data until the file number 0 is given, or until information has been provided for 9 images.
5) If the user provides a file number less than 0, ask again. Do
not ask for further information if the user provides a file number
equal to 0.
6) If the user provides a diagnosis number that is not between 1
and 8, ask again.
7) Store the data in the array of structures in the order it is provided.
8) Write a function to display the information for a particular file number. If the file number was not found, nothing is displayed. The function will return a 1 if the file number was found or a 0 if the file number was not in the array.
9) In your main function, after the loop which requests the data, create another loop that will request a file number from the user and then call the function written for #8 to display the data for that file number. This loop will continue until a file number is provided that is not found.
10) In your main function, after the code for #9, add a loop that will display the information for all items stored in the array in order.
C++ Coding Please
In: Computer Science
When forecasting the number of infected people from COVID-19, what kind of forecasting model you think would be appropriate? For example, exponential smoothing, linear trend, or moving average. Please choose one or more and elaborate the reasons that you think your selected forecasting model is appropriate.
Finally, what is your forecasted number of infected people from COVID-19 based on your selected forecasting model? Please explain your reasons / procedures to get your forecasted number.
In: Operations Management
1. Ventilation refers to breathing. Explain the events that cause us to inhale. Include any relevant laws, the role of the pleurae, any muscles that play a role in quiet inspiration, and the collection of neurons in the brain that directly influences the rate and depth of breathing.
In: Anatomy and Physiology
This document describes a computer program you must write in Python and submit to Gradescope. For this project, the program will simulate the operation of a vending machine that sells snacks, accepting coins and dispensing products and change. In an actual vending machine, a program running on an embedded computer accepts input from buttons (e.g. a numeric keypad) and devices such as coin acceptors, and its output consists of signals that control a display, actuate motors to dispense products, etc.. However, for this project you will build a simulation where all of the necessary input signals are replaced by keyboard input from a user, and all output signals and actions are indicated by printing text to the terminal. 2. PREVIEW Here is a sample session of using the kind of vending machine simulator you are going to write. This example is meant to convey the general idea. A longer sample input and output for the program can be found in Section 7. Red boxes indicate keyboard input from the user. CREDIT : $0 .00 > inventory 0 Nutrition nuggets $1 .00 (5 available ) 1 Honey nutrition nuggets $1 .20 (5 available ) 2 Almonds $18 .00 (4 available ) 3 Nutrition nugget minis $0 .70 (10 available ) 4 A carrot $4 .00 (5 available ) 5 Pretzels $1 .25 (8 available ) CREDIT : $0 .00 > 3 MSG : Insufficient credit CREDIT : $0 .00 > quarter CREDIT : $0 .25 > quarter CREDIT : $0 .50 > quarter CREDIT : $0 .75 > 3 VEND : Nutrition nugget minis RETURN : nickel CREDIT : $0 .00 > 3. OPERATIONAL SPECIFICATION This section describes how your program must operate. The program will be given one command line option, which is the name of a text file containing the inventory. The format of this file is described below (Section 3.1). The program will read this file to determine the starting inventory of snacks. It will then begin the simulation, in which it reads user commands and responds accordingly. The required commands are described in Section 3.4. 3.1. Inventory. Before starting the simulation, your program must open, read, and close the text file specified in the first command line argument after the script name. This file will consists of 6 lines, each of which describes one of the six snacks available for purchase. The format of a line is stock,price,name where stock is the number of the snack available at the beginning of the simulation, price is the price of the snack in cents (which will be a multiple of 5), and name is a string not containing the character ”,” that describes the snack. The order of the snacks is important, because when ordering from the machine, a snack is indicated by its 0-based index; thus snack 2 means the third line of the inventory file. Here is a sample inventory you can use for testing: 6,125,Cheesy dibbles 10,115,Oat biscuits 12,75,Sugar rings 5,150,Celery crunchies 6,205,Astringent persimmon 10,95,Almond crescents This inventory file is available for download from https://dumas.io/teaching/2020/fall/mcs260/project2/sample_inventory.txt This inventory indicates, for example, that snack 2 is Sugar rings, of which there are initially 12 available, each of which has a cost of $0.75. 3.2. The simulation. After reading the inventory, your program should enter a loop (the command loop) in which it does the following, repeatedly, in order: • Print CREDIT: followed by the total amount of credit currently deposited in the machine, printed on the same line. The credit is initially $0.00. It should always be printed as a dollar sign, followed by a dollar amount with two digits after the decimal point. • Print a prompt > • Wait for one line of user input • Perform the action associated with the user input, which may involve additional output (see Section 3.4) Note that during the simulation, you need to keep track of the credit (the total amount of money deposited to the machine) and display it on each iteration of the loop. The remaining stock of each snack must also be tracked, as this will change as a result of purchases and restocking. 3.3. Control logic overview. The next section describes the commands your simulation must accept from the user. This section is a high-level description of the underlying principles of operation; for full details see Section 3.4. The simulated vending machine allows the user to insert coins to add credit. If the credit already equals or exceeds the price of the most expensive snack in the inventory, any coin inserted will be immediately returned. The user can select a snack by number (0–5), and if the credit currently in the machine equals or exceeds the price of the snack, then the snack is dispensed. Any change (the difference of the credit and the price) is dispensed as coins. Finally, a maintenance worker can specify that one of the snacks is being restocked, i.e. more of that snack has been loaded into the machine. Restocked snacks are then available for purchase. 3.4. Commands. The simulation must support the following commands: • quarter - simulates deposit of one quarter ($0.25). If the current credit is less than the most expensive item in the inventory (including any items that may be out of stock), the coin is accepted and credit increases by $0.25. Otherwise, the coin is rejected by printing the line RETURN: quarter to indicate that the quarter just deposited is returned. • dime - simulates deposit of one dime ($0.10). The logic is the same as the quarter command, except that if the dime is not accepted, the line to be printed is RETURN: dime • nickel - simulates deposit of one dime ($0.05). The logic is the same as the quarter command, except that if the nickel is not accepted, the line to be printed is RETURN: nickel • inventory - display the current inventory in the format of 0-based index, followed by name, followed by price, and then a parenthetical statement of the number available, in this format: 0 Cheesy dibbles $1.25 (6 available) 1 Oat biscuits $1.15 (10 available) 2 Sugar rings $0.75 (12 avilable) 3 Celery crunchies $1.50 (5 available) 4 Astringent persimmon $2.05 (6 available) 5 Almond crescents $0.95 (10 available) • Any of the digits 0, 1, 2, 3, 4, 5 - this is a request to purchase the snack whose 0-based index in the inventory is the given integer. The action depends on the current credit and stock: – If the current credit is sufficient to purchase that snack, and if the stock of that snack is positive, then the machine dispenses the snack followed by change. Dispensing the snack is simulated by printing VEND: Name of snack where “Name of snack” is replaced by the name specified in the inventory. Then, returning change is simulated by printing lines such as RETURN: quarter RETURN: dime RETURN: nickel so that each line corresponds to one coin that is returned. The process for making change is subject to additional rules, described in Section 3.5. After a successful purchase and dispensing of change, the stock of that item decreases by one, and the credit is set to $0.00. – If the stock of the requested item is zero, the following line is printed: MSG: Out of stock The credit is unchanged, and the loop begins again immediately. (For example, if the credit was also insufficient for that item, no message is printed to that effect.) – If the stock of the requested item is positive, but the current credit is NOT sufficient to purchase that snack, then the following line is printed: MSG: Insufficient credit The credit is unchanged. • restock - add to the inventory of one snack. This command never appears on a line by itself, and is always followed by a space and then two integers separated by spaces. The first integer is the 0-based index of a snack, and the second is the number of additional items loaded. The effect of this command is to immediately increase the inventory of that snack. The current credit is not changed. For example, restock 3 18 means that the inventory of snack 3 should be increased by 18. • return - a request to return all currently-deposited credit. The credit should be returned to the user in the same way that change is returned after a successful purchase (see Section 3.5 for detailed rules). • exit - exit the program. 3.5. Coin return rules. The specifications above include two situations in which coins need to be dispensed to the user: • After a purchase, to give change • In response to the return command, to return the current credit In each case, simulated coins are dispensed by printing lines such as RETURN: quarter RETURN: dime RETURN: nickel each of which corresponds to a single coin. The sequence of coin return lines must begin with quarters, followed by dimes, and lastly nickels. Change must be given using the largest coins possible, so for example it is never permissible to give two or more dimes and one or more nickel, because the same change could be made with the number of quarters increased by one. For the purposes of this assignment, the machine never runs out of coins. The following “greedy” approach will dispense coins meeting these requirements: (1) Dispense quarters until the remaining amount to return is less than $0.25. (2) Dispense dimes until the remaining amount to return is less than $0.10. (3) Dispense nickels until the remaining amount to return is zero. Note that unlike most real-world vending machines, these rules mean that the return command may give back a different set of coins than the user deposited. For example, after depositing five nickels, the return command would return a single quarter. 3.6. Efficiency. Your program must be able to complete 50 commands in less than 30 seconds, not counting the time a user takes to enter the commands. This is an extraordinarily generous time budget, as a typical solution will take at most 0.01 seconds to complete 50 commands. It is almost certain that you will not need to pay attention to the speed of any operation in your program. However, if you perform tens of millions of unnecessary calculations in the command loop, or do something else unusual that makes your program slow to respond to commands, then the autograder will run out of time in testing your program. In this case you will not receive credit.
In: Computer Science
National Wing Company (NWC) is gearing up for the new B-48
contract. Currently NWC has 100 equally qualified workers. Over the
next three months NWC has made the following commitments for wing
production:
|
Month |
Wing Production |
|
May |
20 |
|
June |
24 |
|
July |
30 |
Each worker can either be placed in production or can train new
recruits. A new recruit can be trained to be an apprentice in one
month. The next month, he, himself, becomes a qualified worker
(after two months from the start of training). Each trainer can
train two recruits. The production rate and salary per employee is
estimated below.
|
Employee |
Production Rate (Wings/Month) |
Salary Per Month |
|
Production |
.6 |
$3,000 |
|
Trainer |
.3 |
3,300 |
|
Apprentice |
.4 |
2,600 |
|
Recruit |
.05 |
2,200 |
At the end of July, NWC wishes to have no recruits or apprentices but have at least 140 full-time workers. Formulate and solve a linear program for NWC to accomplish this at minimum total cost.
(Please provide excel sheets)
In: Operations Management