* Word file clearly describe the test suite (series of test cases) you design for each of the methods in TestWithJUnit.java (one test suite per method). Each test suite should contain at least 5 test cases. Each test case has to be justified: Why did you pick this test case and not another one? Imagine you are limited by time and money about the number of test cases you can pick and run. Why would you make run the test cases you propose? You have to be convincing. In particular, you have to address: WHAT each test case aims to test, and HOW you expect the method to run on this test case (what output do you expect?).
*In a new java file, that you will call TestWithJUnitTester.java, write a JUnit test for each of the test cases you have described in your word file.
* Run your test cases and report the results in your word document. In particular, you have to report whether the method behaves as expected or not on each test case, and propose an explanation in case the method does not behave as expected.
Note: your test cases cannot include the examples given within the code.
Advice: when designing test cases, think:
1/ regular functionality test: does the code perform as expected under normal/expected circumstances?
2/ edge case: does the code still perform when under stress of its expected conditions?
You need to have at least one of the first type (maybe two depending on how complex the code is), and 3 or 4 of the second type.
public class TestWithJUnit {
/* Method withoutTen:
* Return a version of the given array where all
* the 10's have been removed.
* The remaining elements should shift left
* towards the start of the array as needed,
* and the empty spaces a the end of the array
* should be 0.
* So {1, 10, 10, 2} yields {1, 2, 0, 0}.
* {1, 10, 10, 2, 10, 3, 10} yields {1, 2, 3, 0, 0, 0,
0}.
*/
public int[] withoutTen(int[] A) {
int[] result = new
int[A.length];
int index = 0;
for (int i = 0; i < A.length;
i++) {
if (A[i] != 10)
{
result[index] = A[i];
index++;
}
}
for (int i = index; i <
result.length; i++)
result[i] =
0;
return result;
}
/* Method bigArray:
* Given an integer n, bigArray creates and returns a
1D array
* that contains {1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2,
... n}
* For instance, bigArray(4) = {1, 1, 2, 1, 2, 3, 1, 2,
3, 4}
* bigArray(2) = {1, 1, 2}
*/
public int[] bigArray(int n) {
int[] result = new
int[n*(n+1)/2];
int index = 0;
for (int i = 1; i <= n; i++)
{
for (int j = 1;
j <= i; j++) {
result[index] = j;
index++;
}
}
return result;
}
}
In: Computer Science
Discussion
1.What is multiple sclerosis?
2.What is the best treatment for multiple sclerosis?
3.What are the stages of MS?
4.The nurse is assessing a 48-year-old client diagnosed with multiple sclerosis. Which clinical manifestation warrants immediate intervention?
1. The client has scanning speech and diplopia.
2. The client has dysarthria and scotomas.
3. The client has muscle weakness and spasticity.
4. The client has a congested cough and dysphagia.
5. The 30-year-old female client is admitted with complaints of
numbness, tingling, a crawling sensation affecting the extremities,
and double vision which has occurred two(2) times in the month.
Which question is most important for the nurse to ask the
client?
1. "Have you experienced any difficulty with your menstrual
cycle?"
2. "Have you noticed a rash across the bridge of your nose?"
3. "Do you get tired easily and sometimes have problems
swallowing?"
4. "Are you taking birth control pills to prevent conception?"
6. The home health nurse is caring for the client newly diagnosed with multiple sclerosis. Which client issue is of most importance?
1. The client refuses to have a gastrostomy feeding.
2. The client wants to discuss if she should tell her fiancé.
3. The client tells the nurse life is not worth living
anymore
.4. The client needs the flu and pneumonia vaccines.
7. The male client diagnosed with multiple sclerosis states he has been investigating alternative therapies to treat his disease. Which intervention is most appropriate by the nurse?
1. Encourage the therapy if it is not contraindicated by the
medical regimen.
2. Tell the client that only the health-care provider should
discuss this with him.
3. Ask how his significant other feels about this deviation from
the medical regimen.
4. Suggest the client research an investigational therapy
instead.
8. The client diagnosed with an acute exacerbation of multiple sclerosis is placed on high-dose intravenous injections of corticosteroid medication. Which nursing intervention should be implemented?
1. Discuss discontinuing the proton pump inhibitor with the
HCP.
2. Hold the medication until after all cultures have been
obtained.
3. Monitor the client's serum blood glucose levels frequently
4. Provide supplemental dietary sodium with the client's meals.
9.The nurse is admitting a client diagnosed with multiple sclerosis. Which clinical manifestation should the nurse assess? Select all that apply.
1. Muscle flaccidity.
2. Lethargy.
3. Dysmetria.
4. Fatigue.
5. Dysphagia.
10. The 45-year-old client is diagnosed with primary progressive
multiple sclerosis and the nurse writes the nursing diagnosis
"anticipatory grieving related to progressive loss." Which
intervention should be implemented?
1. Consult the physical therapist for assistive devices for
mobility.
2. Determine if the client has legal power of attorney.
3. Ask if the client would like to talk to the hospital chaplain.
4. Discuss the client's wishes regarding end-of-life care.
In: Nursing
Write a C program that calculates the percent saves for a hockey
goalie for 4 games and
the overall percentage of saves which is saves divided by the sum
of goals plus saves.
input->process->output->repeat
The program should prompt the user to enter the number of goals and
the number of
saves for each of the 4 games. The program should then calculate
and display the percent
saves obtained for each game. Once processing is complete for the
games, the program
will calculate the overall percent saves (total saves / sum of
total saves and total goals
and display the results. Then print a friendly exit message as
shown below.
Once you create, compile, link and run your program, your program
should present the
following input/output dialog to the user:
Welcome to the Goalie Saves Analysis
This program will calculate the percentage of saves for
a hockey goalie for 4 games after you have entered the
games and saves for the goalie.
Enter the number of goals for game #1: 3
Enter the number of saves for game #1: 22
The percent saves for game #1 is 88.0%
Enter the number of goals for game #2: 4
Enter the number of saves for game #2: 33
The percent saves for game #2 is 89.2%
Enter the number of goals for game #3: 1
Enter the number of saves for game #3: 16
The percent saves for game #3 is 94.1%
Enter the number of goals for game #4: 0
Enter the number of saves for game #4: 22
The percent saves for game #4 is 100.0%
The percent saves for 4 games for this goalie is 92.1%
Thanks for using the Bruins Goalie Saves Analysis
program.
In: Computer Science
Problem Details:
A major beverage company needs forecasts of sales for next year. Quarterly sales data for the previous 13 years can be found in the “Beverage_Sales” worksheet of the Excel file titled Group Case #2 Data.
Requirements (You will NOT follow the PLAN-DO-REPORT algorithm. Address/answer all requirements in the order given.):
1. (2 points) Create a Time Series plot of the sales data. Briefly describe what you see in the plot.
2. (5 points) Develop a model to forecast sales for the four quarters of year 14.
3. (2 points) Forecast sales for the four quarters of year 14.
4. (4 points) Determine the MSE, MAD, MAPE for the model you developed in requirement #2. Using this information and any relevant information from the results of requirement #2, briefly discuss how accurate you think the forecasts for year 14 are.
Data:
| Year | Quarter | Sales |
| 1 | Q1 | 1807.37 |
| 1 | Q2 | 2355.32 |
| 1 | Q3 | 2591.83 |
| 1 | Q4 | 2236.39 |
| 2 | Q1 | 1549.14 |
| 2 | Q2 | 2105.79 |
| 2 | Q3 | 2041.32 |
| 2 | Q4 | 2021.01 |
| 3 | Q1 | 1870.46 |
| 3 | Q2 | 2390.56 |
| 3 | Q3 | 2198.03 |
| 3 | Q4 | 2046.83 |
| 4 | Q1 | 1934.19 |
| 4 | Q2 | 2406.41 |
| 4 | Q3 | 2249.06 |
| 4 | Q4 | 2211.56 |
| 5 | Q1 | 2237.05 |
| 5 | Q2 | 2856.43 |
| 5 | Q3 | 2799.57 |
| 5 | Q4 | 2645.33 |
| 6 | Q1 | 2563.59 |
| 6 | Q2 | 3146.52 |
| 6 | Q3 | 3196.68 |
| 6 | Q4 | 2930.48 |
| 7 | Q1 | 2878.96 |
| 7 | Q2 | 3687.85 |
| 7 | Q3 | 3608.33 |
| 7 | Q4 | 3288.26 |
| 8 | Q1 | 3178.23 |
| 8 | Q2 | 3939.69 |
| 8 | Q3 | 3680.11 |
| 8 | Q4 | 3516.65 |
| 9 | Q1 | 3354.76 |
| 9 | Q2 | 4490.02 |
| 9 | Q3 | 4678.97 |
| 9 | Q4 | 4148.56 |
| 10 | Q1 | 3995.07 |
| 10 | Q2 | 5178.43 |
| 10 | Q3 | 5010.64 |
| 10 | Q4 | 4453.38 |
| 11 | Q1 | 4306.70 |
| 11 | Q2 | 5321.93 |
| 11 | Q3 | 4888.10 |
| 11 | Q4 | 4554.65 |
| 12 | Q1 | 4176.79 |
| 12 | Q2 | 5125.40 |
| 12 | Q3 | 4962.65 |
| 12 | Q4 | 4917.63 |
| 13 | Q1 | 4542.60 |
| 13 | Q2 | 5284.71 |
| 13 | Q3 | 4817.43 |
| 13 | Q4 | 4634.50 |
In: Math
Tamarisk, Inc. includes the following account among its trade
receivables.
|
Hopkins Co. |
|||||||||
| 1/1 | Balance forward | 854 | 1/28 | Cash (#1710) | 1,342 | ||||
| 1/20 | Invoice #1710 | 1,342 | 4/2 | Cash (#2116) | 1,647 | ||||
| 3/14 | Invoice #2116 | 1,647 | 4/10 | Cash (1/1 Balance) | 187 | ||||
| 4/12 | Invoice #2412 | 2,082 | 4/30 | Cash (#2412) | 1,220 | ||||
| 9/5 | Invoice #3614 | 602 | 9/20 | Cash (#3614 and part of #2412) | 968 | ||||
| 10/17 | Invoice #4912 | 1,045 | 10/31 | Cash (#4912) | 1,045 | ||||
| 11/18 | Invoice #5681 | 2,440 | 12/1 | Cash (#5681) | 1,525 | ||||
| 12/20 | Invoice #6347 | 976 | 12/29 | Cash (#6347) | 976 | ||||
Age the balance.
In: Accounting
By induction:
1. Prove that Σni=1(2i − 1) = n2
2. Prove thatΣni=1 i2 = n(n+1)(2n+1) / 6 .
In: Advanced Math
the owner of a fitness center is interested in estimating the difference in mean years that female members have been with the club compared with male members. he wishes to develop a 99% confidence interval estimate. The data are showen in the accompanying table. Assuming that the same data are approximately normal and that the two populations have equal variances, develop and interpret the confidence interval estimate. dicuss the results
| gender | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1=male 2=female | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
2
|
In: Statistics and Probability
|
Participant |
Hours of Exercise |
Life Satisfaction |
|
1 |
3 |
1 |
|
2 |
14 |
2 |
|
3 |
14 |
4 |
|
4 |
14 |
4 |
|
5 |
3 |
10 |
|
6 |
5 |
5 |
|
7 |
10 |
3 |
|
8 |
11 |
4 |
|
9 |
8 |
8 |
|
10 |
7 |
4 |
|
11 |
6 |
9 |
|
12 |
11 |
5 |
|
13 |
6 |
4 |
|
14 |
11 |
10 |
|
15 |
8 |
4 |
|
16 |
15 |
7 |
|
17 |
8 |
4 |
|
18 |
8 |
5 |
|
19 |
10 |
4 |
|
20 |
5 |
4 |
In: Math
1- Find the solution of the following equations. For each equation, 2- determine the type of the category that the equation belongs to. Separable equation, Homogenous equation, Linear equation, or Bernolli equation?
1. ydx − x ln xdy = 0
2. y ′ = (1+y^2) / (xy(1+x2))
3. xy′ + (1 + y^2 ) tan^−1 y = 0
4. y ′ = (y) / (x+ √xy)
5. y ′ = (y−x) / (y+x)
6. tan x dy/dx + y = 3x sec x
7. (2xy^5 − y)dx + 2xdy = 0
In: Math
The data in the attached excel file comes from Consumer Reports and was collected over a two-year period. It gives the average mpg over a 195-mile trip, the weight of the vehicle (pounds), engine displacement (liters), number of cylinders, horsepower, type of transmission (0 = manual, 1 = automatic), the number of gears and whether the car was foreign (1) or domestic (0).
Part a: Build a model for predicting the average mpg based on the data in the attached excel spread sheet. Show and annotate your work in the excel spread sheet. Include an interpretation of the final model.
Part b: Using your final model from part a, construct an interval estimate of the average mpg of a vehicle which weighs 3000 pounds, with an engine displacement of 2.5 liters, 4 cylinders, 150 hp, manual transmission, 5 gears and is a domestic car. Explain what this means.
| CASE | TRIP MPG | WEIGHT | DISPLACE | NO CYL | HP | TRANS | GEARS | FOR/DORM |
| 1 | 32 | 2365 | 1.6 | 4 | 113 | 0 | 5 | 1 |
| 2 | 33 | 2430 | 1.6 | 4 | 108 | 0 | 5 | 1 |
| 3 | 42 | 1895 | 1.3 | 4 | 60 | 0 | 4 | 1 |
| 4 | 36 | 2320 | 1.6 | 4 | 74 | 1 | 3 | 0 |
| 5 | 32 | 2330 | 1.6 | 4 | 82 | 1 | 3 | 1 |
| 6 | 34 | 2255 | 1.5 | 4 | 68 | 1 | 3 | 1 |
| 7 | 36 | 2350 | 1.6 | 4 | 74 | 1 | 3 | 1 |
| 8 | 41 | 1635 | 1.3 | 4 | 58 | 0 | 4 | 1 |
| 9 | 36 | 2070 | 1.6 | 4 | 82 | 0 | 4 | 1 |
| 10 | 34 | 2115 | 1.5 | 4 | 68 | 0 | 4 | 1 |
| 11 | 35 | 1840 | 1.1 | 4 | 52 | 0 | 4 | 1 |
| 12 | 43 | 1970 | 1.5 | 4 | 78 |
0 |
4 | 1 |
| 13 | 51 | 1575 | 1.0 | 3 | 48 | 0 | 5 | 1 |
| 14 | 37 | 2185 |
1.5 |
4 | 68 | 0 | 4 | 1 |
| 15 | 36 | 2115 | 1.8 | 4 | 81 | 0 | 4 | 1 |
| 16 | 28 | 3040 | 2.2 | 4 | 145 | 1 | 4 | 1 |
| 17 | 34 | 2620 | 2.0 | 4 | 108 | 1 | 3 | 1 |
| 18 | 25 | 3230 | 3.0 | 6 | 142 | 1 | 4 | 1 |
| 19 | 29 | 2745 | 2.0 | 4 | 102 | 1 | 4 | 1 |
| 20 | 28 | 2573 | 1.9 | 4 | 110 | 1 | 4 | 1 |
| 21 | 27 | 2802 | 2.3 | 4 | 100 | 1 | 3 | 0 |
| 22 | 31 | 2699 | 2.0 | 4 | 90 | 1 | 3 | 0 |
| 23 | 36 | 2695 | 2.2 | 4 | 110 | 0 | 5 | 0 |
| 24 | 31 | 2885 | 2.5 | 4 | 100 | 0 | 5 | 0 |
| 25 | 23 | 3310 | 5.0 | 8 | 225 | 1 | 4 | 0 |
| 26 | 23 | 3430 | 5.0 | 8 | 170 | 1 | 4 | 0 |
| 27 | 29 | 2670 | 2.2 | 4 | 97 | 1 | 3 | 0 |
| 28 | 35 | 2925 | 2.0 | 4 | 115 | 1 | 4 | 1 |
| 29 | 28 | 2735 | 2.5 | 4 | 98 | 1 | 3 | 0 |
| 30 | 29 | 3155 | 3.0 | 6 | 140 | 1 | 4 | 0 |
| 31 | 30 | 2995 | 3.0 | 6 | 150 | 1 | 4 | 0 |
| 32 | 27 | 3150 | 3.0 | 6 | 136 | 1 | 3 | 0 |
| 33 | 29 | 2950 | 2.8 | 6 | 125 | 1 | 3 | 0 |
| 34 | 26 | 3295 | 3.8 | 6 | 140 | 1 | 4 | 0 |
| 35 | 28 | 2915 | 2.5 | 4 | 100 | 1 | 3 | 0 |
| 36 | 29 | 3220 | 2.8 | 6 | 125 | 1 | 4 | 0 |
| 37 | 26 | 2900 | 2.2 | 4 | 146 | 1 | 3 | 0 |
| 38 | 27 | 3205 | 2.5 | 4 | 153 | 1 | 4 | 1 |
| 39 | 26 | 2930 | 2.2 | 4 | 103 | 1 | 3 | 0 |
| 40 | 25 | 3320 | 3.0 | 6 | 157 | 1 | 4 | 1 |
| 41 | 26 | 3080 | 2.3 | 4 | 114 | 1 | 4 | 1 |
| 42 | 24 | 3625 | 3.0 | 6 | 136 | 1 | 3 | 0 |
| 43 | 23 | 3665 | 3.0 | 6 | 145 | 1 | 4 | 0 |
| 44 | 22 | 3625 | 2.4 | 4 | 106 | 1 | 4 | 1 |
| 45 | 23 | 3415 | 2.4 | 4 | 107 | 1 | 4 | 1 |
In: Statistics and Probability