****NEED CODED IN C++, READ THE INSTRUCTIONS CAREFULLY AND PAY ATTENTION TO THE INPUT FILE, IT IS REQUIRED FOR USE IN THE PROBLEM****
You are to generate a list of customers to serve based on the customer’s priority, i.e. create a priority queue/list for a local company. The company has been receiving request and the request are recorded in a file, in the order the request was made. The company processes each user based on their priority, the highest priority which is the largest number. Priorities of equal value are first come first served as listed in the input file.
Your input is a collection of customer IDs and priority, one per line.
You are to read in the data and insert new data into a sorted linked list. The linked list is sorted by priority.
A customer may need an update on his order. He may submit a request a second time in order to change his priority level. If so, you will search the linked list, change the priority and adjust the new order in the sorted link list.
Input file: Priority Queue.txt
Output: List of ID’s with priorities in priority order
Example input:
1345 4
8243 1
Example output:
Customer Processing Order
Customer ID Priority
4124 5
1345 4
…. ….
Restrictions: Use an ordered link list for the data structure and a nice formatted print out.
INPUT FILE (NECESSARY TO IMPORT THE DATA INTO THE PROGRAM, NEEDS TO BE USED WITH IFSTREAM)
Priority Queue.txt
1432 2
8234 3
2124 5
8123 2
1314 2
1432 4
7141 3
7123 4
5523 1
6543 2
1731 5
3813 4
7213 5
3318 5
7213 3
7131 2
8882 3
9974 1
7221 3
7342 4
5523 3
3113 5
7002 4
9769 1
3145 5
7145 3
8834 2
9123 4
7878 1
7588 4
2025 1
6069 3
2025 3
The instructions can be translated as follows:
The objective is to make a priority queue/list.
The requests made to fill this queue include a 4-digit customer number and priority level ranging from 1 through 5.
This information is stored in a file.
If 2 customers have the same prio level, then the one that comes first in the list is treated as higher prio.
(first come, first serve basis)
I need to read in Priority Queue.txt to a sorted linked list. (sorted by prio)
I also need to insert new data into this linked list based on user input.
The input is based on a user being able to submit a 2nd request by entering their ID to change their prio level.
I can assume that when they do this, they bump their priority by 1. This is assumed because this program would serve no real function if every customer could just send another request and automatically be prio-5 or set that themself.
In this case, you want to search the Linked List, find the customer ID, change the prio, and adjust the new order in the sorted Linked List.
An ordered Linked List must be used for the data structure, and the output must be formatted neatly.
For input, this program will port in Priority Queue.txt for data.
For output, the program will display the Customer IDs in order of priority, keeping the FCFS rule in mind.
It will then prompt a user to be able to input their Customer ID for another request, bumping their prio by 1, re-sorting the LL, then outputting the new list.
Again, this is CODED IN C++ AND USES THE INPUT FILE FOR DATA.
In: Computer Science
Pure Expectations Theory
The yield on 1-year Treasury securities is 6%, 2-year securities yield 6.2%, 3-year securities yield 6.3%, and 4-year securities yield 6.5%. There is no maturity risk premium. Using expectations theory and geometric averages, forecast the yields on the following securities:
a. 1 year security, 1 year from now
b. 1 year security, 2 years from now
c. 2 year security, 1 year from now
d. A 3 year security , 1 year from now
In: Finance
A researcher wants to see if the dress code used in schools has some impact on the students’ fear of crime [How safe do you feel when at school?]. Fear of crime is measured on a scale from 1 (very unsafe] to 5 [very safe]. She randomly selects 5 students from three schools that have different dress codes: [Note: you should use Excel to answer the questions; if you wish, you may calculate F by hand using the formula included in your book] [15 points]
|
School A |
School B |
School C |
|
3 |
2 |
4 |
|
3 |
2 |
4 |
|
3 |
2 |
3 |
|
4 |
1 |
4 |
|
4 |
3 |
3 |
In: Statistics and Probability
I'm tasked with finding the characteristic equation, eigenvalues, and bases for the eigenspaces of this matrix
[1, -3, 3]
[3,-5,3]
[6,-6,4]
After working on the problem, I believe the characteristic equation is (λ + 2)^2(λ-4), giving eigenvalues of -2 and 4 (please correct me if I'm wrong). However, I'm lost when finding the bases for the eigenspace because I'm not sure the eigenvectors I get are linearly independent.
In: Advanced Math
x2 is the same as x^2, and x3 is x^3,y2 is y^2
|
Y |
|||||
|
f(x,y) |
0 |
1 |
3 |
4 |
|
|
X |
2 |
0.1 |
0.05 |
0.03 |
0.05 |
|
4 |
0.01 |
0.05 |
0.1 |
0.15 |
|
|
8 |
0.01 |
0.06 |
0.19 |
0.2 |
|
In: Statistics and Probability
This is the third time I've posted this... please answer it.
1. Use the data from the file economic risk attached to answer the following:
a. How does a 1% change in the exchange rate for the Brazilian real affect the price of the stock?
b. Is the relationship between the changes in the value of the real and returns on the stock statistically significant? Explain how you determine this.
c. If an investor owning stock in the company were to hedge the real related risk of the stock perfectly, how much lower would the risk of the investment be? (That is, how much lower would the volatility of the stock be after hedging real related risk?)
d. When the value of the real increases, how does the stock price change?
Here is the info you need to answer the quetions:
| Date | Stock price | USD/BRL |
| 6/29/2018 | 0.20 | 3.9742 |
| 6/28/2018 | 0.25 | 3.9729 |
| 6/27/2018 | 0.25 | 3.9732 |
| 6/26/2018 | 0.25 | 3.9674 |
| 6/25/2018 | 0.23 | 3.9622 |
| 6/22/2018 | 0.31 | 3.9692 |
| 6/21/2018 | 0.21 | 3.9775 |
| 6/20/2018 | 0.22 | 3.9656 |
| 6/19/2018 | 0.21 | 3.9601 |
| 6/18/2018 | 0.21 | 3.9729 |
| 6/15/2018 | 0.34 | 3.9659 |
| 6/14/2018 | 0.30 | 3.9683 |
| 6/13/2018 | 0.34 | 3.9544 |
| 6/12/2018 | 0.34 | 3.9642 |
| 6/11/2018 | 0.34 | 3.9637 |
| 6/8/2018 | 0.30 | 3.9626 |
| 6/7/2018 | 0.29 | 3.9692 |
| 6/6/2018 | 0.29 | 3.974 |
| 6/5/2018 | 0.29 | 3.9746 |
| 6/4/2018 | 0.30 | 3.9637 |
| 6/1/2018 | 0.35 | 3.9691 |
| 5/31/2018 | 0.40 | 3.9557 |
| 5/30/2018 | 0.35 | 3.9689 |
| 5/29/2018 | 0.35 | 3.9655 |
| 5/25/2018 | 0.27 | 3.9784 |
| 5/24/2018 | 0.29 | 3.9719 |
| 5/23/2018 | 0.15 | 3.9806 |
| 5/22/2018 | 0.15 | 3.9684 |
| 5/21/2018 | 0.20 | 3.9657 |
| 5/18/2018 | 0.20 | 3.9696 |
| 5/17/2018 | 0.12 | 3.9888 |
| 5/16/2018 | 0.14 | 3.9818 |
| 5/15/2018 | 0.14 | 3.9788 |
| 5/14/2018 | 0.14 | 3.9842 |
| 5/11/2018 | 0.16 | 3.9602 |
| 5/10/2018 | 0.20 | 3.9664 |
| 5/9/2018 | 0.20 | 3.9871 |
| 5/8/2018 | 0.21 | 4.0172 |
| 5/7/2018 | 0.19 | 4.0132 |
| 5/4/2018 | 0.22 | 3.9843 |
| 5/3/2018 | 0.16 | 3.996 |
| 5/2/2018 | 0.24 | 3.9686 |
| 5/1/2018 | 0.24 | 4.0009 |
| 4/30/2018 | 0.24 | 4.0153 |
| 4/27/2018 | 0.21 | 4.023 |
| 4/26/2018 | 0.25 | 4.0131 |
| 4/25/2018 | 0.29 | 4.0189 |
| 4/24/2018 | 0.29 | 4.0083 |
| 4/23/2018 | 0.21 | 4.0012 |
| 4/20/2018 | 0.21 | 4.0105 |
| 4/19/2018 | 0.32 | 4.0209 |
| 4/18/2018 | 0.31 | 4.0337 |
| 4/17/2018 | 0.29 | 4.014 |
| 4/16/2018 | 0.29 | 4.0116 |
| 4/13/2018 | 0.26 | 4.0126 |
| 4/12/2018 | 0.30 | 4.0153 |
| 4/11/2018 | 0.29 | 3.9991 |
| 4/10/2018 | 0.20 | 4.0006 |
| 4/9/2018 | 0.20 | 4.0029 |
| 4/6/2018 | 0.22 | 3.9928 |
| 4/5/2018 | 0.22 | 3.9716 |
| 4/4/2018 | 0.24 | 3.9297 |
| 4/3/2018 | 0.25 | 3.921 |
| 4/2/2018 | 0.25 | 3.9146 |
| 3/29/2018 | 0.25 | 3.8996 |
| 3/28/2018 | 0.23 | 3.9273 |
| 3/27/2018 | 0.20 | 3.944 |
| 3/26/2018 | 0.20 | 3.901 |
| 3/23/2018 | 0.30 | 3.8699 |
| 3/22/2018 | 0.26 | 3.851 |
| 3/21/2018 | 0.26 | 3.8451 |
| 3/20/2018 | 0.28 | 3.8515 |
| 3/19/2018 | 0.29 | 3.8456 |
| 3/16/2018 | 0.37 | 3.826 |
| 3/15/2018 | 0.35 | 3.8154 |
| 3/14/2018 | 0.35 | 3.8156 |
| 3/13/2018 | 0.26 | 3.8193 |
| 3/12/2018 | 0.26 | 3.8152 |
| 3/9/2018 | 0.30 | 3.8273 |
| 3/8/2018 | 0.40 | 3.8156 |
| 3/7/2018 | 0.42 | 3.8078 |
| 3/6/2018 | 0.42 | 3.8054 |
| 3/5/2018 | 0.40 | 3.7966 |
| 3/2/2018 | 0.40 | 3.8027 |
| 3/1/2018 | 0.40 | 3.7896 |
| 2/28/2018 | 0.40 | 3.778 |
| 2/27/2018 | 0.40 | 3.7903 |
| 2/26/2018 | 0.40 | 3.783 |
| 2/23/2018 | 0.40 | 3.7788 |
| 2/22/2018 | 0.42 | 3.7689 |
| 2/21/2018 | 0.42 | 3.7678 |
| 2/20/2018 | 0.42 | 3.7573 |
| 2/16/2018 | 0.45 | 3.756 |
| 2/15/2018 | 0.47 | 3.7637 |
| 2/14/2018 | 0.40 | 3.7538 |
| 2/13/2018 | 0.35 | 3.7684 |
| 2/12/2018 | 0.35 | 3.755 |
| 2/9/2018 | 0.30 | 3.7708 |
| 2/8/2018 | 0.15 | 3.7602 |
| 2/7/2018 | 0.35 | 3.7559 |
| 2/6/2018 | 0.38 | 3.7416 |
| 2/5/2018 | 0.37 | 3.7414 |
| 2/2/2018 | 0.35 | 3.7612 |
| 2/1/2018 | 0.36 | 3.7834 |
| 1/31/2018 | 0.45 | 3.7689 |
| 1/30/2018 | 0.37 | 3.7682 |
| 1/29/2018 | 0.32 | 3.7652 |
| 1/26/2018 | 0.27 | 3.7637 |
| 1/25/2018 | 0.37 | 3.761 |
| 1/24/2018 | 0.35 | 3.7447 |
| 1/23/2018 | 0.32 | 3.7452 |
| 1/22/2018 | 0.35 | 3.701 |
| 1/19/2018 | 0.35 | 3.7058 |
| 1/18/2018 | 0.35 | 3.7083 |
| 1/17/2018 | 0.35 | 3.6991 |
| 1/16/2018 | 0.33 | 3.7002 |
| 1/12/2018 | 0.32 | 3.6999 |
| 1/11/2018 | 0.30 | 3.6923 |
| 1/10/2018 | 0.30 | 3.6777 |
| 1/9/2018 | 0.30 | 3.6823 |
| 1/8/2018 | 0.31 | 3.6695 |
| 1/5/2018 | 0.30 | 3.6797 |
| 1/4/2018 | 0.44 | 3.672 |
| 1/3/2018 | 0.44 | 3.6827 |
| 1/2/2018 | 0.44 | 3.6864 |
| 12/29/2017 | 0.50 | 3.6859 |
| 12/28/2017 | 0.46 | 3.6857 |
| 12/27/2017 | 0.46 | 3.6847 |
| 12/26/2017 | 0.45 | 3.689 |
| 12/22/2017 | 0.45 | 3.6799 |
| 12/21/2017 | 0.45 | 3.6853 |
| 12/20/2017 | 0.45 | 3.6958 |
| 12/19/2017 | 0.45 | 3.6807 |
| 12/18/2017 | 0.45 | 3.6817 |
| 12/15/2017 | 0.45 | 3.6686 |
| 12/14/2017 | 0.45 | 3.6713 |
| 12/13/2017 | 0.44 | 3.6794 |
| 12/12/2017 | 0.42 | 3.6893 |
| 12/11/2017 | 0.45 | 3.6677 |
| 12/8/2017 | 0.45 | 3.6541 |
| 12/7/2017 | 0.50 | 3.6575 |
| 12/6/2017 | 0.45 | 3.6668 |
| 12/5/2017 | 0.45 | 3.656 |
| 12/4/2017 | 0.45 | 3.6443 |
| 12/1/2017 | 0.45 | 3.6356 |
| 11/30/2017 | 0.46 | 3.6381 |
| 11/29/2017 | 0.45 | 3.6435 |
| 11/28/2017 | 0.48 | 3.6304 |
| 11/27/2017 | 0.50 | 3.6214 |
| 11/24/2017 | 0.50 | 3.6244 |
| 11/22/2017 | 0.52 | 3.6281 |
| 11/21/2017 | 0.52 | 3.6141 |
| 11/20/2017 | 0.59 | 3.6236 |
| 11/17/2017 | 0.52 | 3.6129 |
| 11/16/2017 | 0.51 | 3.6198 |
| 11/15/2017 | 0.51 | 3.6203 |
| 11/14/2017 | 0.45 | 3.6093 |
| 11/13/2017 | 0.40 | 3.6173 |
| 11/10/2017 | 0.40 | 3.6208 |
| 11/9/2017 | 0.40 | 3.6019 |
| 11/8/2017 | 0.45 | 3.6148 |
| 11/7/2017 | 0.41 | 3.6199 |
| 11/6/2017 | 0.38 | 3.6209 |
| 11/3/2017 | 0.40 | 3.6198 |
| 11/2/2017 | 0.45 | 3.6078 |
| 11/1/2017 | 0.45 | 3.6016 |
| 10/31/2017 | 0.52 | 3.6146 |
| 10/30/2017 | 0.55 | 3.6024 |
| 10/27/2017 | 0.52 | 3.6163 |
| 10/26/2017 | 0.54 | 3.5964 |
| 10/25/2017 | 0.57 | 3.6004 |
| 10/24/2017 | 0.52 | 3.6051 |
| 10/23/2017 | 0.52 | 3.6091 |
| 10/20/2017 | 0.52 | 3.6037 |
| 10/19/2017 | 0.54 | 3.5936 |
| 10/18/2017 | 0.51 | 3.5988 |
| 10/17/2017 | 0.55 | 3.611 |
| 10/16/2017 | 0.55 | 3.6113 |
| 10/13/2017 | 0.50 | 3.5971 |
| 10/12/2017 | 0.58 | 3.5892 |
| 10/11/2017 | 0.60 | 3.5969 |
| 10/10/2017 | 0.60 | 3.5844 |
| 10/9/2017 | 0.59 | 3.6041 |
| 10/6/2017 | 0.50 | 3.5925 |
| 10/5/2017 | 0.65 | 3.5947 |
| 10/4/2017 | 0.60 | 3.5924 |
| 10/3/2017 | 0.60 | 3.5929 |
| 10/2/2017 | 0.62 | 3.5991 |
| 9/29/2017 | 0.65 | 3.6054 |
| 9/28/2017 | 0.65 | 3.6096 |
| 9/27/2017 | 0.58 | 3.5957 |
| 9/26/2017 | 0.65 | 3.6092 |
| 9/25/2017 | 0.62 | 3.6046 |
| 9/22/2017 | 0.59 | 3.6035 |
| 9/21/2017 | 0.50 | 3.6033 |
| 9/20/2017 | 0.55 | 3.6096 |
| 9/19/2017 | 0.55 | 3.6012 |
| 9/18/2017 | 0.52 | 3.5988 |
| 9/15/2017 | 0.59 | 3.5954 |
| 9/14/2017 | 0.59 | 3.5984 |
| 9/13/2017 | 0.55 | 3.5938 |
| 9/12/2017 | 0.60 | 3.5849 |
| 9/11/2017 | 0.60 | 3.5895 |
| 9/8/2017 | 0.60 | 3.5813 |
| 9/7/2017 | 0.50 | 3.594 |
| 9/6/2017 | 0.55 | 3.6055 |
| 9/5/2017 | 0.61 | 3.5887 |
| 9/1/2017 | 0.67 | 3.6029 |
| 8/31/2017 | 0.68 | 3.5862 |
| 8/30/2017 | 0.50 | 3.5875 |
| 8/29/2017 | 0.60 | 3.5849 |
| 8/28/2017 | 0.69 | 3.5784 |
| 8/25/2017 | 0.65 | 3.5778 |
| 8/24/2017 | 0.71 | 3.5739 |
| 8/23/2017 | 0.66 | 3.5681 |
| 8/22/2017 | 0.60 | 3.5598 |
| 8/21/2017 | 0.60 | 3.5658 |
| 8/18/2017 | 0.50 | 3.5528 |
| 8/17/2017 | 0.50 | 3.5566 |
| 8/16/2017 | 0.50 | 3.5538 |
| 8/15/2017 | 0.50 | 3.5435 |
| 8/14/2017 | 0.43 | 3.5511 |
| 8/11/2017 | 0.50 | 3.5572 |
| 8/10/2017 | 0.50 | 3.5547 |
| 8/9/2017 | 0.48 | 3.5558 |
| 8/8/2017 | 0.48 | 3.5393 |
| 8/7/2017 | 0.39 | 3.5331 |
| 8/4/2017 | 0.48 | 3.5494 |
| 8/3/2017 | 0.50 | 3.5313 |
| 8/2/2017 | 0.50 | 3.5422 |
| 8/1/2017 | 0.50 | 3.548 |
| 7/31/2017 | 0.50 | 3.529 |
| 7/28/2017 | 0.49 | 3.5218 |
| 7/27/2017 | 0.41 | 3.536 |
| 7/26/2017 | 0.50 | 3.5369 |
| 7/25/2017 | 0.50 | 3.5377 |
| 7/24/2017 | 0.50 | 3.5304 |
| 7/21/2017 | 0.41 | 3.5295 |
| 7/20/2017 | 0.41 | 3.5254 |
| 7/19/2017 | 0.51 | 3.5389 |
| 7/18/2017 | 0.60 | 3.5229 |
| 7/17/2017 | 0.60 | 3.5337 |
| 7/14/2017 | 0.60 | 3.5409 |
| 7/13/2017 | 0.60 | 3.5352 |
| 7/12/2017 | 0.64 | 3.5463 |
| 7/11/2017 | 0.60 | 3.5426 |
| 7/10/2017 | 0.60 | 3.5473 |
| 7/7/2017 | 0.60 | 3.5387 |
| 7/6/2017 | 0.60 | 3.5407 |
| 7/5/2017 | 0.60 | 3.5388 |
| 7/3/2017 | 0.65 | 3.542 |
In: Finance
If the joint probability density function of the random variables X and Y is given by f(x, y) = (1/4)(x + 2y) for 0 < x < 2, 0 < y < 1, 0 elsewhere
(a) Find the conditional density of Y given X = x, and use it to evaluate P (X + Y/2 ≥ 1 | X = 1/2)
(b) Find the conditional mean and the conditional variance of Y given X = 1/2
(c) Find the variance of W = X − 2Y + 3
(d) Find the covariance of X and Y, and determine if X and Y are independent
In: Statistics and Probability
In: Accounting
Problem 9-14A Measures of Internal Business Process Performance [LO9-3]
|
DataSpan, Inc., automated its plant at the start of the current year and installed a flexible manufacturing system. The company is also evaluating its suppliers and moving toward Lean Production. Many adjustment problems have been encountered, including problems relating to performance measurement. After much study, the company has decided to use the performance measures below, and it has gathered data relating to these measures for the first four months of operations. |
|
Month |
|||||
| 1 | 2 | 3 | 4 | ||
| Throughput time (days) | ? | ? | ? | ? | |
| Delivery cycle time (days) | ? | ? | ? | ? | |
| Manufacturing cycle efficiency (MCE) | ? | ? | ? | ? | |
| Percentage of on-time deliveries | 77% | 78% | 83% | 90% | |
| Total sales (units) | 10,550 | 10,560 | 10,510 | 10,500 | |
Management has asked for your help in computing throughput time, delivery cycle time, and MCE. The following average times have been logged over the last four months:
|
Average per Month (in days) |
|||||||||
| 1 | 2 | 3 | 4 | ||||||
| Move time per unit | 0.8 | 0.5 | 0.4 | 0.5 | |||||
| Process time per unit | 0.3 | 0.5 | 0.5 | 0.4 | |||||
|
Wait time per order before start |
9.2 | 9.0 | 5.0 | 4.0 | |||||
| Queue time per unit | 3.6 | 3.9 | 2.3 | 1.1 | |||||
| Inspection time per unit | 0.7 | 0.6 | 0.5 | 0.5 | |||||
| Required: | |
| 1-a. | Compute the throughput time for each month. (Round your answers to 1 decimal place.) |
|
||||||||||||||||
| 1-b. |
Compute the manufacturing cycle efficiency (MCE) for each month. (Round your answers to 1 decimal place (i.e., 0.123 should be entered as 12.3).)
Problem 9-17A Comparison of Performance Using Return on Investment (ROI) [LO9-1]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Accounting
Background: Recall from the lecture notes that an integer x can
be represented as a vector [xw−1, xw−2, . . . , x0],
where w is the number of bits used to represent x. As a fun
exercise, let us consider a problem where we want to
partition x into two new numbers, labelled y and z. We can do this
by scanning through the bits of x from the least
significant bit (lsb) to the most significant bit (msb). We form
the new integers, y & z, according to the following
rule. Anytime a 1 is encountered during the scan through x we place
a 1 in either y or z in an alternating pattern.
Moreover, the bits are placed into the new integers at the same bit
position as found in the original integer x. Below
is an example.
Let x = (13)10 = (1101)2. Then, scanning from lsb to msb gives the
following result.
• Position 0: x0 = 1. Thus, y0 = 1, giving y = (0001)2.
• Position 1: x1 = 0. Thus, nothing happens.
• Position 2: x2 = 1. Thus, z2 = 1, giving z = (0100)2.
• Position 3: x3 = 1. Thus, y3 = 1, giving y = (1001)2.
The final result is that y = (1001)2 = (9)10 and z = (0100)2 =
(4)10.
Problem: Write a Java program that takes an integer x as an input
and produces y and z as an output.
Sample Execution:
Enter an integer x
13
y z
9 4
In: Computer Science