1 Program Summary
We are subcontractors for the Corellian Engineering Corportation (CEC) and we are working on one of the subsystems for the MC85 star cruiser. Our task is to model stress on a particular surface of the cruiser. Stress is defined as σ = Ld Area , where Ld is the load and Area is the area. Let’s say we are working with the metric measure system. So the load would be in kilo grams. Area would be meters. We need log into the system and enter the weight (Load) and the Area, (length x width) and calculate and display the stress on that particular area.
2 Program Behavior The program will do the following.
1: declare floating point variables, fLoad, fWidth, fLength and initialize them
2: declare a string to hold login password
3: display the message ”Stress Modeling SubSystem 0.1a”
4: display the login message ”Login ID: ”
5: get the login id from the user
6: compare it to the special code ”0a132”
7: don’t do the calculation if special code doesn’t match, also print out an error message (see below)
8: if the login id matches the special code we prompt the user for load, length and width
9: make sure that we give the user an error message if either length or width are 0, also print out an error message (see below)
10: we calculate the stress value
11: we display the stress value with accuracy of 2 decimal places.
12: make sure we always show the decimal value
Please note that I will be compiling your code on my computer and testing your code to see if it runs. use c++ language for this assignment and please do add a screenshot of all your codifications.
In: Computer Science
Open House_Price data.
Test if there is a significant difference in house prices for houses that are less than 31 years old compared to houses that are 31 years or older. Answer the questions for Assessment. (Pick the closest answer)
1. What is the P-value?
2. What is the Statistical interpretation?
3. What is the conclusion?
DATA: Age #Bathrooms #Rooms #BedRooms #FirePlaces sellingPrice in $100000 42 1 7 4 0 4.9176 62 1 7 4 0 5.0208 40 1 6 3 0 4.5429 54 1 6 3 0 4.5573 42 1 6 3 0 5.0597 56 1 6 3 0 3.891 51 1 7 3 1 5.898 32 1 6 3 0 5.6039 32 1 6 3 0 5.8282 30 1 6 3 0 5.3003 30 1 5 2 0 6.2712 32 1 6 3 0 5.9592 32 1 6 3 0 5.6039 50 1.5 8 4 0 8.2464 17 1.5 6 3 0 7.7841 23 1 7 3 0 9.0384 22 1.5 6 3 0 7.5422 44 1.5 6 3 0 6.0931 3 1 7 3 0 8.14 31 1.5 8 4 0 9.1416 42 2.5 10 5 1 16.4202 14 2.5 9 5 1 14.4598 46 1 5 2 1 5.05 22 1.5 7 3 1 6.6969 40 1 6 3 1 5.9894 50 1.5 8 4 1 8.7951 48 1.5 8 4 1 8.3607 30 1.5 6 3 1 12
In: Statistics and Probability
Test if there is a significant difference in house prices for houses with 4 or more bedrooms, if compared to houses with 3 or less bedrooms. Answer the questions for Assessment. (Pick the closest answer)
1. What is the P-value? a. 0.074081031 b. 1.85525E-07 c. 0.002738669 d. 0.000144083
2. What is the Statistical interpretation? a. The P-value is too small to have a conclusive answer. b. The P-value is much smaller than 5% thus we are very certain that house prices are different. c. The P-value is much smaller than 5% thus the answer is inconclusive. d. The P-value is larger than 5% thus the answer is inconclusive.
3. What is the conclusion? a. Statistical interpretation agrees with the intuition: the house prices are different due to the number of bedrooms in the house. b. The statistics does not conform to the intuition that there is a difference in house price since one would expect number of bedrooms changes the house price. c. Since the test is inconclusive the conclusion is inconclusive as well. d. The test does not make statistical sense.
Age #Bathrooms #Rooms
#BedRooms #FirePlaces sellingPrice in
$100000
42 1 7 4
0 4.9176
62 1 7 4
0 5.0208
40 1 6 3
0 4.5429
54 1 6 3
0 4.5573
42 1 6 3
0 5.0597
56 1 6 3
0 3.891
51 1 7 3
1 5.898
32 1 6 3
0 5.6039
32 1 6 3
0 5.8282
30 1 6 3
0 5.3003
30 1 5 2
0 6.2712
32 1 6 3
0 5.9592
32 1 6 3
0 5.6039
50 1.5 8 4
0 8.2464
17 1.5 6 3
0 7.7841
23 1 7 3
0 9.0384
22 1.5 6 3
0 7.5422
44 1.5 6 3
0 6.0931
3 1 7 3
0 8.14
31 1.5 8 4
0 9.1416
42 2.5 10 5
1 16.4202
14 2.5 9 5
1 14.4598
46 1 5 2
1 5.05
22 1.5 7 3
1 6.6969
40 1 6 3
1 5.9894
50 1.5 8 4
1 8.7951
48 1.5 8 4
1 8.3607
30 1.5 6 3
1 12
In: Statistics and Probability
. As input you are given two arrays: an array of numbers ? and an array ? of queries where each query is a target number. The array ? is unsorted and may contain duplicates. Your goal is, for each query ? in the array ?, count the number of pairs in the array ? that sums up to ?; that is, the number of distinct pairs of indices [?, ?], with ? < ?, such that ?[?] + ?[?] = ?. Write a method, twoSumQuery, that given an array of numbers ? and an array ? of queries, returns an array ? with the same length as ?, such that for every index ?, ?[?] is the answer to query ?[?]. Let ? denote the length of ? and ? the length of ?. Suppose that in the actual input for this problem, we have the condition that ? > ? . For example, ? = 1000 and ? = 10,000,000. Your method must have time complexity ?(?).
The following is a few sample runs:
Input : ? = [0, 1, 2, 3, 4], ? = [1, 3, 6, 10]
Return: [1, 2, 1, 0]
Explanation: One pair in ? sums up to 1, namely (0, 1). Two pairs in ? sum up to 3, namely (0, 3) and (1, 2). One pair in ? sum up to 6, namely (2, 4). No pair in ? sums up to 10.
public class TwoSumQuery {
public static int[] twoSumQuery(int[] A, int[] Q)
{
//Replace this line with your
return statement
return null;
}
}
In: Computer Science
A bank invested $50 million in a one-year asset paying 10 percent interest per year and simultaneously issued a $50 million, two-year liability paying 8 percent interest per year to pay for it. • Is the bank short funded or long funded? • What is the bank’s net interest income in year one • What will be the bank’s net interest income in year two if at the end of the first year all interest rates have decreased by 1.5 percent (150 basis points)?
In: Finance
Optimal Capital Structure with Hamada
Beckman Engineering and Associates (BEA) is considering a change in its capital structure. BEA currently has $20 million in debt carrying a rate of 8%, and its stock price is $40 per share with 2 million shares outstanding. BEA is a zero growth firm and pays out all of its earnings as dividends. The firm's EBIT is $14.276 million, and it faces a 40% federal-plus-state tax rate. The market risk premium is 6%, and the risk-free rate is 7%. BEA is considering increasing its debt level to a capital structure with 50% debt, based on market values, and repurchasing shares with the extra money that it borrows. BEA will have to retire the old debt in order to issue new debt, and the rate on the new debt will be 15%. BEA has a beta of 1.2.
What is the total value of the firm with 50% debt? Enter your
answers in millions. For example, an answer of $10,550,000 should
be entered as 10.55. Do not round intermediate calculations. Round
your answer to three decimal places.
$ million
In: Finance
Beckman Engineering and Associates (BEA) is considering a change in its capital structure. BEA currently has $20 million in debt carrying a rate of 8%, and its stock price is $40 per share with 2 million shares outstanding. BEA is a zero growth firm and pays out all of its earnings as dividends. The firm's EBIT is $14.276 million, and it faces a 40% federal-plus-state tax rate. The market risk premium is 6%, and the risk-free rate is 7%. BEA is considering increasing its debt level to a capital structure with 50% debt, based on market values, and repurchasing shares with the extra money that it borrows. BEA will have to retire the old debt in order to issue new debt, and the rate on the new debt will be 15%. BEA has a beta of 1.2.
What is the total value of the firm with 50% debt? Enter your
answers in millions. For example, an answer of $10,550,000 should
be entered as 10.55. Do not round intermediate calculations. Round
your answer to three decimal places.
$ million
In: Finance
Create a C++ file with given instructions below-
Analyze random numbers
Create two arrays, one int one double. They should have 10 elements each
Ask the user how many random numbers to generate. Then generate that many random numbers between 1 and 10. Use a for loop. Keep track of how many of each number in the range was generated (1 to 10) in the int array. Be sure to initialize the array to all 0's to start.
Then, send both arrays off to a function. This function will calculate the percentage of each number. For example: if you generated 200 numbers, and 3 was generated 24 times, it would be 12%. Store the percentages in the double array. You will also need to send the amount of numbers generated to this function, also.
Output the count and percentages in another function.
Note: Run this with 10, 100, 1000, and 10,000 numbers. Do this in separate runs, no need to code it to do it. Do you see a trend in the percentages? (No need to turn in your answer)
In: Computer Science
Business Law: Allen is driving below the speed limit in the left lane of a busy one-way road. Out of nowhere, a ten-year-old child, Ben, runs into the street chasing a soccer ball. Allen, in order to avoid hitting Ben, swerves into the right lane. Allen avoids hitting Ben but causes Carl, who is driving in the right lane going 20 mph over the speed limit, to lose control of his car and hit a telephone pole. Carl is badly hurt. The telephone phone falls over and snaps in two. One half of the pole roles over and crushes Ben’s leg; the other half falls onto Danny’s house and smashes a hole in the roof. Discuss and Explain the following:
A. As to Ben, is Allen liable for damages? What defenses would be available to Allen?
B. As to Carl, is Allen liable for damages? What defenses would be available to Allen?
C. As to Danny, is Allen liable for damages? What defenses would be available to Allen?
In: Operations Management
Gautam is interested in learning what types of ethical messages are most effective.
He has three conditions, integrity, confidentiality, professional behavio, and
he randomly assigns 20 people to each of these conditions. After each person reads the message, they rate its effectiveness
on a 1-10 scale.He runs a one-way ANOVA and finds the following results:
Condition Mean
Integrity 6
Confidentiality 5
Professional Behavior 9
Source SS df MS F
Between 3000 2
Within
Total 11,500 59
a)Complete the one-way ANOVA table.
b) Determine the critical F at a=.01
What conclusion should Gautam make?
c) Is it appropriate to calculate a Tukey HSD test for this problem? Why? If it is appropriate, calculate a Tukey HSD test for each of the three possible comparisons between two means. What groups are significantly different from each other at a=.01
(integrity, confidentiality, professional behavior) according to this test?
In: Math