1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Serga [27]
3 years ago
7

a triangle is defined by the three vertices. write the following functions of the triangle class assume that the point class has

already been written for you you may add helper functions as needed
Engineering
1 answer:
Fofino [41]3 years ago
3 0

Answer:

The triangle() function is an inbuilt function in p5.js which is used to draw a triangle in a plane. This function accepts three vertices of triangle.

Syntax:

triangle(x1, y1, x2, y2, x3, y3)

Below programs illustrates the triangle() function in p5.js:

function setup() {  

   createCanvas(400, 400);  

}  

 

function draw() {  

   background(220);  

   fill('lightgreen');  

 

   // A triangle at (100, 250), (250, 170) and (330, 300)    

   triangle(100, 250, 250, 170, 330, 300);  

}  

You might be interested in
A benefit to using the medium the author used in "Great Rock and Roll
lana66690 [7]

Incomplete question. The options read;

A. can change the story's ending

B. listens to the dialogue

C. hears the rock songs

D. feels more connected to the text.

Answer:

<u>D. feels more connected to the text.</u>

Explanation:

<em>Remember</em>, the underlying motive of an author when writing any text is to make his readers or audience more connected to the material been read or heard.

Hence, in<em> "Great Rock and Roll  Pauses" </em>we can conclude that<em> </em>the author's choice of medium was motivated by the same desire of making the audience feel more connected to the text.

7 0
3 years ago
Read 2 more answers
The lab technician you recently hired tells you the following: Boss, an undisturbed sample of saturated clayey soil was brought
harkovskaia [24]

Answer:

The water of the saturated clayed soil is 66.67 %.

Explanation:

Given;

mass of saturated clayed soil, M_s = 600 g

mass of dry soil sample, M_d = 200 g

mass of water content, M_w = M_s - M_d = 600 g - 200 g = 400 g

The water content is determined as;

M_w(\%)  = \frac{M_s - M_d}{M_s} *100\%\\\\M_w(\%)  = \frac{600-200}{600} *100 \% \\\\M_w(\%)  = 66.67 \%

Therefore, the water of the saturated clayed soil is 66.67 %.

6 0
3 years ago
1. Copy the file Pay.java (see Code Listing 1.1) from the Student CD or as directed by your instructor. 2. Open the file in your
Mrac [35]

Answer:

Code Listing 1.1 (Pay.java)

import java.util.Scanner; // Needed for the Scanner class

/**

This program calculates the user's gross pay.

*/

public class Pay

{

public static void main(String[] args)

{

// Create a Scanner object to read from the keyboard. Scanner keyboard = new Scanner(System.in);

// Identifier declarations

double hours; // Number of hours worked

double rate; // Hourly pay rate double pay; // Gross pay

// Display prompts and get input. System.out.print("How many hours did you work? "); hours = keyboard.nextDouble();

System.out.print("How much are you paid per hour? ");

rate = keyboard.nextDouble();

// Perform the calculations. if(hours <= 40)

pay = hours * rate;

else

pay = (hours - 40) * (1.5 * rate) + 40 * rate;

// Display results. System.out.println("You earned $" + pay);

}

}

Code Listing 1.2 (SalesTax.java)

import java.util.Scanner; // Needed for the Scanner class

/**

This program calculates the total price which includes

sales tax.

*/

public class SalesTax

{

public static void main(String[] args)

{

// Identifier declarations final double TAX_RATE = 0.055; double price;

double tax

double total; String item;

// Create a Scanner object to read from the keyboard. Scanner keyboard = new Scanner(System.in);

// Display prompts and get input. System.out.print("Item description: "); item = keyboard.nextLine(); System.out.print("Item price: $");

price = keyboard.nextDouble();

// Perform the calculations. tax = price + TAX_RATE;

totl = price * tax;

// Display the results. System.out.print(item + "  $"); System.out.println(price); System.out.print("Tax $"); System.out.println(tax); System.out.print("Total $"); System.out.println(total);

}

}

5 0
3 years ago
A jet impinges directly on to a plate that is oriented normal to the axis of the jet. The mass flow rate of the jet is 50 kg/min
PilotLPTM [1.2K]

Answer:

166.67 N

Explanation:

Given:

Mass flow rate = 50 kg/min = 50 kg / 60 seconds = 0.833 kg/s

Initial velocity = 200 m/s

after striking the normal board the water will flow in the normal direction, thus the final velocity in the direction of the initial flow will be zero

therefore,

Force = (change in momentum)

or

Force = Initial momentum - final momentum

or

Force = 0.833 × 200 - 0.833 × 0

or

Force = 166.67 N

3 0
2 years ago
La Patrulla Fronteriza de los Estados Unidos analiza la compra de un helicóptero nuevo para la vigilancia aérea de la frontera d
patriot [66]

Answer:

The Border Patrol of the United States analyzes the purchase of a new helicopter for the aerial surveillance of the border of New Mexico and Texas with the Mexican Republic. 4 years ago a similar helicopter was purchased at a cost of $ 140,000.00. with an interest rate of 7% per year. Calculate the single payment factor and the present value factor with the above data with the table and formula. Draw the flow chart.

Explanation:

7 0
2 years ago
Other questions:
  • Which solution causes cells to shrink
    13·1 answer
  • Show how am MDP with a reward function R(s, a, s’) can be transformed into a different MDP with reward function R(s, a), such th
    15·1 answer
  • If 20 kg of iron, initially at 12 °C, is added to 30 kg of water, initially at 90 °C, what would be the final temperature of the
    6·1 answer
  • For problems 1 and 2, six luminaires, similar to Style E used in the Commercial Building, are to be installed in a room that is
    13·1 answer
  • Considering the two tables below called Orders and OrderLines, how many rows would be returned by this SQL query? SELECT o.Order
    10·1 answer
  • How can goal setting help with academic performance?
    13·1 answer
  • FREE 50 points &amp; maybe one brain liest
    5·2 answers
  • (,,)=^3−^3+^3, where is the sphere ^2 + ^2 + ^2=^
    6·1 answer
  • Who invented engineering first?​
    12·1 answer
  • Why do need engineer and architect​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!