Write a function that takes the base and height of a triangle and return its area.

Answers

Answer 1
Answer:

    //Method/function name is areaOfTriangle

    //Return type is double

    //Method receives two parameters of type double - base and height

    public static double areaOfTriangle(double base, double height){

        //Find the area using the formula: 1/2 * base * height

        double area = 0.5 * base * height;

       

        //return the area

        return area;

       

   } //End of areaOfTriangle method

Step-by-step explanation:

The function above has been written in Java.

It contains comments explaining each line of the code. Please go through the comments.

In order to test the function, a complete program containing a main method has also been written. This is shown as follows;

//Class definition begins

public class Area{

       

    //Method/function name is areaOfTriangle

    //Return type is double

    //Method receives two parameters of type double - base and height

    public static double areaOfTriangle(double base, double height){

        //Find the area using the formula: 1/2 * base * height

        double area = 0.5 * base * height;

       

        //return the area

        return area;

       

    }  //End of areaOfTriangle method

   

   

    //Write the main method to call the method

    public static void main(String []args){

       

       //Call the areaOfTriangle() method in the main method

       //Set the base to 12 and the height to 6

       System.out.println(areaOfTriangle(12, 6));

    }

   

   

} //End of class definition

Sample Output

>> 36.0


Related Questions

-5|4x - 4|- 9 = 31.
What’s the answer

Answers

Jahdisnevhdfbwhjcnsvvjxv

A large mixing tank initially contains 1000 gallons of water in which 40 pounds of salt have been dissolved. Another brine solution is pumped into the tank at the rate of 5 gallons per minute, and the resulting mixture is pumped out at the same rate. The concentration of the incoming brine solution is 3 pounds of salt per gallon. If A(t) represents the amount of salt in the tank at time t, the correct differential equation for A is Select the correct answer

Answers

Answer:

c the answer is c

Step-by-step explanation:

please help meee!! 20 points!!!!

Answers

Im pretty sure it’s a cause that’s what said was right for me

2. Write each expression using exponents
(10 Points)
(-5) (-5)(-5) (-5)

Answers

Answer:[tex]5^{3}[/tex]

Step-by-step explanation:

Answer:

-5 to the forth power

Step-by-step explanation:

2605.40
Significant digits

Answers

yes indeed significant

Based on the scatterplot of the transformed data and the residual plot, which type of model is appropriate for estimating print publication each year? A linear model is appropriate because the residual plot does not show a clear pattern. A power model is appropriate because the scatterplot of years and the log of circulation is roughly linear. An exponential model is appropriate because the scatterplot of years and the log of circulation is roughly linear and the residual plot shows no distinct pattern. Both an exponential and a power model would be appropriate because the log of circulation was used to develop the model.

Answers

Answer:

C

Step-by-step explanation:

Answer: c

Step-by-step explanation:

I just took the test and got it correct

What is the value of x

Answers

Answer: x = 60

Step-by-step explanation: Notice that these two angles are vertical angles.

Whenever two lines intersect, a pair of vertical angle is always formed.

Now, vertical angles are always congruent.

So we can setup the equation 2x + 24 = 144.

Solving from here, we first subtract 24 from both sides to get 2x = 120.

Now dividing both sides by 2, we find that x = 60.

So x = 60.

Answer:

c. 60°

Step-by-step explanation:

[tex](2x +24)\° = 144\°\\\\2x+24\°=144\°[/tex]

Collect like terms and simplify

[tex]2x\° =144\°-24\°\\\\2x\°=120\°[/tex]

Divide both sides of the equation by 2 and simplify

[tex]\frac{2x}{2} = \frac{120}{2} \\\\x =60\°[/tex]

ASAP!!! Please help!!!

Answers

Answer:

[tex]-\frac{28}{99}[/tex]

Step-by-step explanation:

To divide a fraction by a fraction, flip the second fraction and change the divide sign into a multiplication sign.

[tex]\frac{4}{9}\div -\left(\frac{11}{7}\right)=\frac{4}{9} *-\frac{7}{11}[/tex]

Multiply:

[tex]-\frac{4*7}{9*11}[/tex]

[tex]-\frac{28}{99}[/tex]

HELP PLEASE I NEED THIS IN

Answers

Answer:

the degree is about 120

Step-by-step explanation:

b and a is about 60 something and so is b and c so add all that up and you get about 120 degrees.

What is the value of f(-2)?

Answers

Answer:

-2f

Step-by-step explanation:

(-6-4)÷(-5) how to do it

Answers

Answer:

2

Step-by-step explanation:

Hey there!

[tex]Answer:\boxed{2}[/tex]

[tex]Explanation:[/tex]

[tex](-6-4)/(-5)[/tex]

First reduce the expression and then cancel the common factors.

2

Hope this helps!

Solve forj.
-j - 9> -6 or -5j + 18 < 19

Answers

Answer:

j < 3

j > -1/5

Step-by-step explanation:

Question 1:

-j - 9 > -6

-j > 3

j < 3

Question 2:

-5j + 18 < 19

-5j < 1

j > -1/5

i>19 is the answer you need

What is the distance between the two points ?
A)6.5
B)6.3
C)16
D)6.7

Answers

Answer:

The answer is option B

Step-by-step explanation:

The distance between two points can be found by using the formula

[tex]d = \sqrt{( {x1 - x2})^{2} + ({y1 - y2})^{2} } \\ [/tex]

where

(x1 , y1) and (x2 , y2) are the points

From the question the points are

( -2 , 1) and ( 4,3)

The distance is

[tex]d = \sqrt{( { - 2 - 4})^{2} + ({1 - 3})^{2} } \\ = \sqrt{ ({ - 6})^{2} + ({ - 2})^{2} } \\ = \sqrt{36 + 4} \\ = \sqrt{40} \\ = 2 \sqrt{10} \\ = \:6.324555[/tex]

We have the final answer as

6.3

Hope this helps you

Step-by-step explanation:

Hey there!!!

Given, the points are (4,3) and (-2,1).

Then,

x1=4 x2=-2

y1=3 y2=1

Now, Using distance formula,

[tex](distance ) = \sqrt{ {(x2 - x1)}^{2} + ( {y2 - y1)}^{2} } [/tex]

Put all values.

[tex](distance ) = \sqrt{ {( - 2 - 4)}^{2} + {(1 - 3)}^{2} } [/tex]

Simplify them.

[tex](distance ) = \sqrt{( { - 6)}^{2} + ( { - 2)}^{2} } [/tex]

[tex](distance ) = \sqrt{36 + 4} [/tex]

[tex](distance ) = \sqrt{40} [/tex]

(distance )= 6.3245 units.

Therefore, the distance between the points(4,3) and (-2,1) is 6.32units.

So, your answer is option B.

Hope it helps....

The perimeter of a rectangle is 34 units. Its width is 6.56, point, 5 units.

Answers

Answer: equation for length 34- (6.5 times 2)  that whole thing divided by 2

Step-by-step explanation:

You know the width and a rectangle has 2 PAIRS of equal sides so if you know the width you just have to multiply that  by 2  [ to account 4 the other side with the same length] and subtract that from the perimeter! Then you divide that answer by 2 to get what one side's length is!

hope that helped if it was not helpful sorry because i am a first grader :/

Point B lies between points A and C on Line segment A C . Let x represent the length of segment AB in inches. The length of line A C is 20 inches. The space between points A and B is labeled x. The space between points B and C is labeled 3 x. Use the segment to complete the statements. The value of x is . The length of Line segment A B in inches is . The length of Line segment B C in inches is .

Answers

AB = x

BC = 3x

AC = 20 inches = AB + BC

Let's plug our values into the equation above.

20 inches = x + 3x

Combine like terms

20 inches = 4x

Divide both sides by 4

5 = x

AB = x = 5 inches

BC = 3x = 3(5) = 15 inches

The value of x is

✔ 5

The length of Line segment A B in inches is

✔ 5

The length of Line segment B C  in inches is

✔ 15

<3

Directions: Write an integer for each situation,
1. an 8 degree rise in temperature
2. 47 feet below sea level
3. a 19-yard gain
4. overdrawing an account by $124
5. two strokes below par
6. a 20-foot extension

Answers

Answer with explanation:

In integers , we represent quantity of terms such as rise, above , increment by positive integers whereas its opposite such as fall,  below, decrement is denoted by negative integers.

1. an 8 degree rise in temperature

Required integer = 8

2. 47 feet below sea level

Required integer =  =  -47

3. a 19-yard gain

Required integer =  19

4. overdrawing(taken more money out of account than the account has) an account by $124

Required integer =  - 124

5. two strokes below par

Required integer =   -2

6. a 20-foot extension

Required integer =  20

The EPA standard for safe drinking water is a maximum of 1.3 milligrams of copper per liter of water. A water testing firm found 8.3 milligrams of copper in a 5-liter sample drawn from Jim and Sharon LeBlanc's
house. Is the water safe or not? By how much does the amount of copper exceed or fall short of the maximum allowed?

Is the water safe for drinking?

No
Yes

Answers

I think the answer is no

I add 45 to a certain number and then divide the sum by 2 the result is five the original number find the original number​

Answers

Hey there! I'm happy to help!

Let's call this number n. We can create the following equation.

(n+45)/2=5

Let's solve. We multiply both sides by 2.

n+45=10

We subtract 45 from both sides.

n=-35.

Have a wonderful day! :D

Answer:

n=-35

Step-by-step explanation:

SOMEONE HELP ME PLEASE ASAP!!!

Answers

Answer:

600

Step-by-step explanation:

0+.80x=60+.70x

-.70x=60-.70x

.10x=60

÷.10=÷.10

C=600

0+.80(600)=480

60+.70(600)=480

After Simon donated four books to the school library he had 28 books left. How many books did Simon have to start with?

Answers

Add the number he gave away to the number he has left.

28 + 4 = 32

He started with 32 books

Write the complex number 4(cos 60 + i sin 60) in standard form 10. Use DeMoivre's Theorem to find (2+3i)6

Answers

Answer:

a) The standard form of [tex]z = 4\cdot (\cos 60^{\circ}+i\cdot \sin 60^{\circ})[/tex] is [tex]z = 2 + i\cdot 2\sqrt{3}[/tex], b) [tex]z = (2+i\cdot 3)^{6} = 1219.585 + i \cdot 1829.381[/tex].

Step-by-step explanation:

a) The standard form of the complex number is [tex]z = a + i\cdot b[/tex], [tex]\forall \,a,b \in \mathbb{R}[/tex]. If we get that [tex]z = 4\cdot (\cos 60^{\circ}+i\cdot \sin 60^{\circ})[/tex], whose standard form is obtained by algebraic means:

1) [tex]z = 4\cdot (\cos 60^{\circ}+i\cdot \sin 60^{\circ})[/tex] Given

2) [tex]z = (4\cdot \cos 60^{\circ})+i\cdot (4\cdot \sin 60^{\circ})[/tex] Distributive and Associative properties.

3) [tex]z = 2 + i\cdot 2\sqrt{3}[/tex] Multiplication/Result.

The standard form of [tex]z = 4\cdot (\cos 60^{\circ}+i\cdot \sin 60^{\circ})[/tex] is [tex]z = 2 + i\cdot 2\sqrt{3}[/tex].

b) The De Moivre's Theorem states that:

[tex]z = (a+i\cdot b)^{n}= r^{n}\cdot (\cos \theta + i\cdot \sin \theta)[/tex]

Where:

[tex]r =\sqrt{a^{2}+b^{2}}[/tex] and [tex]\theta = \tan^{-1} \left(\frac{b}{a}\right)[/tex].

If we know that [tex]z = (2+i\cdot 3)^{6}[/tex], then:

[tex]r = \sqrt{2^{2}+3^{2}}[/tex]

[tex]r =\sqrt{13}[/tex]

[tex]r \approx 3.606[/tex]

[tex]\theta = \tan^{-1}\left(\frac{3}{2} \right)[/tex]

[tex]\theta \approx 56.310^{\circ}[/tex]

The resulting expression is:

[tex]z = 3.606^{6}\cdot (\cos 56.310^{\circ}+i\cdot \sin 56.310^{\circ})[/tex]

[tex]z = 1219.585+i\cdot 1829.381[/tex]

Therefore, [tex]z = (2+i\cdot 3)^{6} = 1219.585 + i \cdot 1829.381[/tex].

help me out with this question ​

Answers

it’s the 400 voters surveyed
Answer: D) The 400 voters surveyed

The population is the entire set of registered voters (11100) in the city. This is what the election officials care about, so they won't focus on any other city data.

Inside that population, the much smaller sample is generated to try to make an educated guess about what the population will do. In this case, the sample is the 400 people surveyed. If the sample was generated randomly enough, then it should be unbiased to give a good idea of what the population will do.

what do you mean by herbivores?​

Answers

Answer:

An animal or insect that only eats vegetation, such as grasses, fruits, leaves, vegetables, roots and bulbs.

Step-by-step explanation:

Answer:

Plant eating dinosaurs

Step-by-step explanation:

Herbivores have the word herb in it which refers to it being a plant eating dinosaur so a carnivore has the word carn which also refers to it being a meat eating dinosaur.

Find the taylor series generated by f at x = a. f(x) = 1/9-x, a = 3.

Answers

Answer:

The generated Taylor series is;

f(x) = 1/6 + (x-3)/36 + (x-3)^2/216 + (x-3)^3/1296......

Kindly note that the series here is truncated at the third derivative, but if wanted, evaluation could be more than this

Step-by-step explanation:

Here, we are to find the Taylor series generated by f at x = a

Mathematically;

f(x)= 1/(9-x)

The f(a) at this point is calculated below;

f(a) = 1/(9-3) = 1/6

The first derivative is calculated below;

f'(x) = 1/(9-x)^2

f'(3) = 1/6^2 = 36

The second derivative is calculated below;

f''(x) = 2/(9-x)^3

f''(3) = 2/(9-3)^3 = 2/6^3 = 2/216 = 1/108

The third derivative is calculated as follows

f'''(x) = 6/(9-x)^4

f'''(3) = 6/(9-3)^4 = 6/6^4 = 1/216..

The Taylor series is thus given by;

f(x) = f(a) + f'(a) (x-a) + f''(a) (x-a)^2/2! + f'''(a) (x-a)^3/3! +...

Substituting the values of 3 for a at each of the points , we obtain the Taylor series as shown below;

f(x) = 1/6 + (x-3)/36 + (x-3)^2*1/108*1/2 + (x-3)^3*1/216*1/6 +...

f(x) = 1/6 + (x-3)/36 + (x-3)^2/216 + (x-3)^3/1296......

What percent is represented by the shaded portion on this 10 × 10 grid?
I WILL GIVE BRAINLIEST

Answers

Answer:

10×10=100

The grid has 100 squares

75 squares are shaded blue

so that is 75 out of 100 or 75/100

which 75/100 = 0.75 which equals 75%

Step-by-step explanation:

The answer is choice 4 which is 75%

Answer:

D

Step-by-step explanation:

HELPPPP PLEASEEEEE I NEED THIS ASAP

Answers

Answer:

10:4

Step-by-step explanation:

5:2=10:4 because 5 times 2 is 10,

and 2 times 2 is 4.

So they make up to be 10:4

Mrs. Berry’s class organized the lunch orders for their upcoming party in the table below.Lunch Orders for the Class Party
Lunch Choice
Number
Vegetarian Sandwich
3
Turkey Sandwich
7
Pepperoni Pizza
8
Cheese Pizza
10

Which ratio represents the number of orders for pepperoni pizza to cheese pizza?
A.4:5
B.5:4
C.StartFraction 10 Over 8 EndFraction
D.StartFraction 18 Over 10 EndFraction

Answers

Given:

Number  of Vegetarian Sandwich = 3

Number of Turkey Sandwich  = 7

Number  of  Pepperoni Pizza  = 8

Number  of  Cheese Pizza  = 10

To find:

The ratio which represents the number of orders for pepperoni pizza to cheese pizza.

Solution:

The ratio of number of orders for pepperoni pizza to cheese pizza is

[tex]\text{Ratio}=\dfrac{\text{Number of orders for pepperoni pizza}}{\text{number of orders for cheese pizza}}[/tex]

[tex]\text{Ratio}=\dfrac{8}{10}[/tex]

[tex]\text{Ratio}=\dfrac{4}{5}[/tex]

Therefore, the required ratio is 4:5 and option A is correct.

Answer:

4:5 and option A is correct.

Step-by-step explanation:

edge2020

Solve (−3) ⋅ 2. plz i need help

Answers

Answer: -6

Step-by-step explanation:

Answer:

-6

Step-by-step explanation:

Rule: When multiplying or dividing two numbers with the same sign (both positive or both negative), the answer is positive. When multiplying or dividing two numbers with different signs (one positive and one negative), the answer is negative.

Here you have a negative number and a positive number. Since their signs are different, the product is negative.

(-3) * 2 = -6

R= {(-3, -2), (-3, 0), (-1, 2), (1, 2)}
Select all numbers that are in the domain.
-3
-2,
-1
о
1
2

Answers

domains -3,-1,1
hope this helps

Answer: -3,-1, and 1.

Step-by-step explanation: You are given the relation R = {(-3, -2), (-3, 0), (-1, 2), (1, 2)} The domain of the relation are all possible inputs and the range of the relation are all possible outputs. So, the inputs are : -3,-1,1; and the outputs are : -2,0,2. As a result, the domain is : -3,-1,1; and the range is : -2,0,2.

Consider these shapes.
Shape A

3x^2+ 2
7x2 + 4x + 8
Shape B
3x^2+ 2

If shape B is a square, which polynomial represents the difference of the areas of shape A and shape B?
A. 8x +8x + 12
B. 12x^4+ 12x^3 + 26x^2 + 8x + 12
C. 32x^2 + 8x + 28
D. 30x^4 + 12x^3 + 40x^2 + 8x + 20

Answers

Answer:

The correct answer is B :)

Step-by-step explanation:

The difference in the area of shape A and shape B is option B which is [tex]12x^{4}+12x^{3}+26x^{2} +8x+12[/tex].

What is area of rectangle and square?

Area of rectangle and square is the extent of surface rectangle and square exhibits into them. The area of rectangle is length * breadth and the area of square is side*side.

How to find area?

We have been given the length of shape A=[tex]7x^{2} +4x+8[/tex] and breadth be [tex]3x^{2} +2[/tex] and the side of shape B be [tex]3x^{2} +2[/tex].

Shape A looks like rectangle and shape B looks like square.

So the area becomes:

Area of shape A =[tex](3x^{2} +2) ( 7x^{2} +4x+8)[/tex]

we have to multiply both expressions

=[tex]21x^{4} +12x^{3} +24x^{2} +14x^{2} +8x+16[/tex]

=[tex]21x^{4} +12x^{3} +38x^{2}+8x+16[/tex]

Area of shape B=[tex](3x^{2} +2)(3x^{2} +2)[/tex]

=[tex]9x^{4} +6x^{2} +6x^{2} +4[/tex]

=[tex]9x^{4} +12x^{2} +4[/tex]

Difference=[tex]21x^{4}+12x^{3}+38x^{2} +8x+16-9x^{4} -12x^{2} -4[/tex]

=[tex]12x^{4} +12x^{3}+26x^{2} +8x+12[/tex]

Hence the difference between shape A and shape B is [tex]12x^{4} +12x^{3}+26x^{2} +8x+12[/tex].

Learn more about area at https://brainly.com/question/25965491

#SPJ2

Other Questions
9. Check all that apply.Which TWO sentences use verbs correctly?Please help What area of earth contains semi-solid rock and lava? Amy ran a race in 20.7 seconds. Katie finished the race 0.258 second before Amy. How long did it take Katie to run the race? Real space refers to two dimensional space.True Or False? solve for yy + 8 = 2 y = f(x) = 4xFind f(x) when x=1/2Enter the correct answer. How was the art of ancient Mesopotamia different from that of earlier cultures?OA. It included monuments that glorified the gods and showed religion insociety.OB. It included pretend animals and showed human imagination.C. They showed people in different activities and gave information about dailylifeD. Their art was all based on useful items and showed a focused empire. Which shared American value is explicitly stated in the Declaration of Independence?a. that slavery should not exist in Americab. that everyone is entitled to equal treatment under the lawc. that all citizens, regardless of age, should have the right to voted.that one religion is superior to all others Read the following paragraph.Hectors soccer team did not play well that afternoon. Time and again, they lost the ball to the other team. They could only watch helplessly as their opponents scored goal after goal, while Hectors team failed to score a single point. It seemed as though every attempt Hector and his teammates made to succeed was futile. Hector overheard one of the players telling an onlooker that this was the worst they had ever played. Hector knew it had been a bad game, but surely this was an exaggeration.Which of the following phrases provides a context clue for the definition of the word exaggeration?only watch helplesslyworst they had ever playedas though every attempttelling an onlooker What is the parent function of the following function: f(x) = |x - 31| 2 o linearo absolute valueO constant o quadratic See your levelsThe word honorable has the same root as the word honor. Based on what you know aboutthe word honor, what does the word honorable mean?deserving of respectdeserving of luckdeserving of fundeserving of moneySubmit What type of phrase is the sentence as a Mandarin speaker Find the inverse of the equation below.y =(x + 1)2 Find the percent of change in the perimeter. Asking the woman to close the introitus during a pelvic examination is a test for:_____.a. endometriosis.b. rectocele.c. cervical polyps.d. sphincter tone. PLEASE HELP ASAP I NEED THIS DONE ASAP!!! Below the ileocecal valve is a blind pouch called the_________ sorry lol one more ...please help!!!!!!! In the beginning of "The World on Turtle's Back," why did the husband become "terrified"? He was terrified the he might never see his wife again. He was terrified that his wife might fall through the hole in the sky. He was terrified that he would be punished for marring a sacred tree. He was terrified that the Great Tree would fall into the ocean. Mary is having a party at the park. She is going to spend $438.The cost to rent the shelter is $15 plus food is going to cost $6per person. How many people is she having?