Questions
---------------------------------------------------------------------------------------------------------------- C++ //code a program for the following the given Instruction. Geometry Calculator 1. Calculate the...

----------------------------------------------------------------------------------------------------------------

C++

//code a program for the following the given Instruction.

Geometry Calculator

1. Calculate the Area of a Circle

2. Calculate the Area of a Rectangle

3. Calculate the Area of a Triangle

4. Quit

Enter your choice (1-4):

If the user enters 1, the program should ask for the radius of the circle and then display its area. Use 3.14159 for pi.

#03   If the user enters 2, the program should ask for the length and width of the rectangle, and then display the rectangle's area.

#04   If the user enters 3, the program should ask for the length of the triangle's base and its height, and then display its area.

#05   If the user enters 4, the program should end.

#06   Input validation: Accept only values 1-4 for the menu and only positive values for the other user inputs.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

In: Computer Science

java code Question 2: What are the type and value of each of the expressions below?...

java code

Question 2: What are the type and value of each of the expressions below?

int [] numbers = { 3, 6, 15, 22, 100, 0 };

double [] decimals = { 3.5, 4.5, 2.0, 2.0, 2.0 };

String [] words = {"alpha", "beta", "gamma"};

  1. numbers[3] + numbers[2]

  1. decimals[2] - decimals[0] + numbers[4]

  1. words[1].charAt( numbers [0] )

  1. numbers[4] * decimals[1] <= numbers[5] * numbers[0]

In: Computer Science

Below are four bivariate data sets and the scatter plot for each. (Note that each scatter...

Below are four bivariate data sets and the scatter plot for each. (Note that each scatter plot is displayed on the same scale.) Each data set is made up of sample values drawn from a population.

x y
1.0 10.0
2.0 9.0
3.0 8.0
4.0 7.0
5.0 6.0
6.0 5.0
7.0 4.0
8.0 3.0
9.0 2.0
10.0 1.0

x

1

2

3

4

5

6

7

8

9

10

11

y

1

2

3

4

5

6

7

8

9

10

11

0

Figure 1
            
u v
1.0 7.3
2.0 9.1
3.0 7.2
4.0 5.3
5.0 8.0
6.0 5.2
7.0 4.2
8.0 7.1
9.0 6.2
10.0 3.6

u

1

2

3

4

5

6

7

8

9

10

11

v

1

2

3

4

5

6

7

8

9

10

11

0

Figure 2
w t
1.0 2.5
2.0 4.3
3.0 3.6
4.0 5.3
5.0 4.5
6.0 7.1
7.0 5.9
8.0 7.6
9.0 6.9
10.0 8.1

w

1

2

3

4

5

6

7

8

9

10

11

t

1

2

3

4

5

6

7

8

9

10

11

0

Figure 3
            
m n
1.0 3.8
2.0 6.7
3.0 8.0
4.0 8.8
5.0 9.6
6.0 9.8
7.0 9.0
8.0 8.0
9.0 6.7
10.0 4.0

m

1

2

3

4

5

6

7

8

9

10

11

n

1

2

3

4

5

6

7

8

9

10

11

0

Figure 4

Answer the following questions. The same response may be the correct answer for more than one question.

1. Which data set indicates the strongest negative linear relationship between its two variables? Choose onethe x, y data setthe u, v data setthe w, t data setthe m, n data set
2. In which data set is there evidence of a strong nonlinear relationship between the two variables? Choose onethe x, y data setthe u, v data setthe w, t data setthe m, n data setnone of the data sets
3. Which data set indicates a perfect positive linear relationship between its two variables? Choose onethe x, y data setthe u, v data setthe w, t data setthe m, n data setnone of the data sets
4. Which data set has an apparent positive, but not perfect, linear relationship between its two variables? Choose onethe x, y data setthe u, v data setthe w, t data setthe m, n data setnone of the data sets

In: Statistics and Probability

Compile the following C code to MIPS assembly. a. Assume that i and j are stored...

Compile the following C code to MIPS assembly.

a. Assume that i and j are stored in register $s1 and $s2, respectively. i = i – 2 + j;

b. Assume base address of Array B and the variable i are stored in registers $s3 and $s1, respectively. B[1] = (B[0] x 4) - I;

Explain each step in detail!

my professor has the following answer: 1) addi $t0, $s1, -2 add $s1, $$t0, $s2

2) lw $t0, 0 ($s3) #load B[0] into a register sll $t0, $t0, 2 #shift left logical A[2] x 4 #(may have several different ways) sub $t0, $t0, $s1 # (B[0] x 4) - i sw $t0, 4($s0)

Can you explain in detail why?

In: Computer Science

Two different leasing options are listed for a truck (worth $27,995 new). How much more must...

Two different leasing options are listed for a truck (worth $27,995 new). How much more must be paid in monthly fees over the full 4 years to take option 2 (instead of option 1)?  What is that extra money getting you?

Option 1: Take out a 4-year lease.  That is, drive the same car for 4 years paying a monthly fee of $247.28, then turn the car in.  

Option 2: Take out two consecutive 2-year leases.  That is, after 2 years, turn in the car and lease a new Wrangler for another 2 years.  The lease payments would be $257.69 per month.

If you don’t lease at all but take out a 4-year loan at 4.2% interest compounded monthly to buy the car, should the monthly payments be more or less than option A?  Why? What will your monthly loan payment be?  

In: Finance

1. A prison administrator is interested in examining the relationships between the type of prison security...

1. A prison administrator is interested in examining the relationships between the type of prison security (maximum, medium, and minimum) and the number of previous offenses committed by an inmate. He believes that maximum security prisons have inmates with many prior offenses, medium security with not so many offenses, and minimum security with almost no prior offenses. He randomly selects eight new inmates from each of the three security levels and compares the number of offenses for which they have ever been charged.

a) What is the independent variable?              

b) What is the dependent variable?

c) What is the null hypothesis?

d) What is the research hypothesis?

e) Interpret the results.

Maximum Medium Minimum
8 4 2
6 4 2
4 3 3
5 6 2
3 5 4
7 6 1
6 3 2
9 3 2

In: Math

On August 1, Teal, Inc. exchanged productive assets with Flint, Inc. Teal’s asset is referred to...

On August 1, Teal, Inc. exchanged productive assets with Flint, Inc. Teal’s asset is referred to below as “Asset A,” and Flint’ is referred to as “Asset B.” The following facts pertain to these assets. Asset A Asset B Original cost $105,600 $121,000 Accumulated depreciation (to date of exchange) 44,000 51,700 Fair value at date of exchange 66,000 82,500 Cash paid by Teal, Inc. 16,500 Cash received by Flint, Inc. 16,500 Assuming that the exchange of Assets A and B has commercial substance, record the exchange for both Teal, Inc. and Flint, Inc. in accordance with generally accepted accounting principles.

Account Titles and Explanation

Debit

Credit

Teal, Inc.’s Books

1.

2.

3.

4.

5.

Flint, Inc.’s Books

1.

2.

3.

4.

5.

Assuming that the exchange of Assets A and B lacks commercial substance, record the exchange for both Teal, Inc. and Flint, Inc. in accordance with generally accepted accounting principles.

Account Titles and Explanation

Debit

Credit

Teal, Inc.’s Books

1.

2.

3.

4.

Flint, Inc.’s Books

1.

2.

3.

4.

5.

In: Accounting

Please answer the last step for question 1. Answer it asap please. Thanks 1. Consider the...

Please answer the last step for question 1. Answer it asap please. Thanks

1. Consider the following data for three different samples from three different populations:Consider the following data for three different samples from three different populations:

Sample 1

Sample 2

Sample 3

0

6

6

4

8

5

0

5

9

1

4

4

0

2

6

T = 5

T = 25

T = 30

G = 60

SS = 12

SS = 20

SS = 14

∑X2 = 356

Compute a one-way ANOVA, with α = .05.

Step 1: State your hypotheses in SYMBOLS.

Step 2: Draw your distribution and shade in the critical region (remember that you have to compute df to find the CR).

Step 3a: Calculate the test statistic.

Step 4: Make a decision about your hypotheses.

Step 5: Compute and interpret effect size

Step 6: Compute Tukey’s HSD to determine where significant differences lie

2. Factorial ANOVAs involve Main Effects and Interactions. Define the terms Main Effects and Interactions.

In: Statistics and Probability

Assume that you are the manager of a shop that assembles power tools. You have just...

Assume that you are the manager of a shop that assembles power tools. You have just received an order for 50 chain saws, which are to be shipped at the start of week 8. Pertinent information on the saws is

Item Lead Time (weeks) On Hand Components
Saw 2 15 A(2), B(1), C(4)
A 1 10 E(3), D(1)
B 2 5 D(2), F(3)
C 2 65 E(2), D(2)
D 1 20
E 1 10
F 2 30


b. Develop the material requirements plan for component E using lot-for-lot ordering. (Leave no cells blank - be certain to enter "0" wherever required.)

Item: E(3) & E(2) LT = 1 wk. Beg. Inv. 1 2 3 4 5 6 7 8
Gross requirements
Scheduled receipts
Projected on hand
Net requirements
Planned order receipt
Planned order release

Please help me super confused on this problem

In: Operations Management

Many regions in North and South Carolina and Georgia have experienced rapid population growth over the...

Many regions in North and South Carolina and Georgia have experienced rapid population growth over the last 10 years. It is expected that the growth will continue over the next 10 years. This has motivated many of the large grocery store chains to build new stores in the region. The Kelley’s Super Grocery Stores Inc. chain is no exception. The director of planning for Kelley’s Super Grocery Stores wants to study adding more stores in this region. He believes there are two main factors that indicate the amount families spend on groceries. The first is their income and the other is the number of people in the family. The director gathered the following sample information.

Family Food Income Size
1 $ 4.24 $ 73.98 2
2 4.08 54.90 2
3 5.76 59.43 4
4 3.48 52.02 1
5 4.20 65.70 2
6 4.80 53.64 4
7 4.32 79.74 3
8 5.04 68.58 4
9 6.12 165.60 5
10 3.24 64.80 1
11 4.80 138.42 3
12 3.24 125.82 1
13 6.37 77.58 7
14 5.51 170.74 7
15 6.60 126.42 6
16 5.40 141.30 3
17 6.00 36.90 5
18 5.40 56.88 4
19 3.36 71.82 1
20 4.68 69.48 3
21 4.32 54.36 2
22 5.52 87.66 5
23 4.56 38.16 3
24 5.40 43.74 7
25 7.10 37.46 6

Food and income are reported in thousands of dollars per year, and the variable size refers to the number of people in the household.

a-1. Develop a correlation matrix. (Round your answers to 3 decimal places. Negative amounts should be indicated by a minus sign.)

Food Income
Income
Size

b-1. Determine the regression equation. (Round your answer to 3 decimal places.)

The regression equation is: Food = + Income + size

b-2. How much does an additional family member add to the amount spent on food? (Round your answer to the nearest dollar amount.)

Another member of the family adds to the food bill.

c-1. What is the value of R2? (Round your answer to 3 decimal places.)

R2

c-2. Complete the ANOVA (Leave no cells blank - be certain to enter "0" wherever required. Round SS, MSto 4 decimal places and F to 2 decimal places.)

Source DF SS MS F p-value
Regression
Error
Total

c-3. State the decision rule for 0.05 significance level. H0: = ?1 = ?2 = 0; H1: Not all ?i's = 0. (Round your answer to 2 decimal places.)

H0 is rejected if F >

d-1. Complete the table given below. (Leave no cells blank - be certain to enter "0" wherever required. Round Coefficient, SE Coefficient, P to 4 decimal places and T to 2 decimal places.)c-4. Can we reject H0: = ?1 = ?2 = 0?

Predictor Coefficient SE Coefficient t p-value
Constant
Income
Size

d-2. Would you consider deleting either of the independent variables?

There is to delete a variable.

In: Statistics and Probability