subject

LAB: Triangle area comparison (classes) Given class Triangle (in file Triangle java), complete main) to read and set the base and height of triangle and of triangle, determine which triangle's area is larger, and output that triangle's info, making use of Triangle's relevant methods Ex: If the input is 3.0 4.0 4.0 5.0 where 3.0 is triangle1's base, 4.0 is trianglet's height, 40 is triangle2's base, and 5.0 is trianghe2's height, the output is. Triangle with larger area: Base: 4.00 Height: 5.00 Area: 10.00 0/10 LAB ACTIVITY 3.26.1: LAB: Triangle area comparison (classes) Load default template Current fide TriangleArea java 1 Import java. util. Scanner; 2 3 public class TriangleArea 1 public static void main(String[] args) Scanner scor-new Scanner(System. in); 6 Triangle triangle? - new Triangle(); Triangle trianglez - new Triangle(); 9 10 1/1000: Read and set base and height for trange (use Setcase) and Stright) Current file: TriangleArea. java 1 import java. util. Scanner; 2 3 public class TriangleArea { 4 public static void main(String[] args) { 5 Scanner scnr - new Scanner(System. in); Triangle trianglel - new Triangle(); Triangle triangle2 - new Triangle(); // TODO: Read and set base and height for triangles (use setBase() and setHeight()) 7/ TODO: Read and set base and height for triangle2 (use setBase() and setHeight()) // TODO: Determine larger triangle (use getArea()) System. out. println("Triangle with larger area: "); 17 TODO: Output larger triangle's info (use printInfo())

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, Gaby702
Which is produced by the endocrine system to control how cells and organs function
Answers: 2
image
Computers and Technology, 22.06.2019 05:10, kellysimkin6196
Read the code below. what will the computer print if the input for year_variable is 1700? if year_variable == 1776: print("your answer is correct. the declaration of independence was signed in “year_variable”.") elif year_variable < 1776: compute_variable = 1776 - year_variable. print("add “compute_variable“ years to your answer for the correct answer.") elif year_variable > 1776: compute_variable = year_variable - 1776 print("subtract “compute_variable” years from your answer for the correct answer.")
Answers: 1
image
Computers and Technology, 22.06.2019 09:50, laurentsofia09
Assume that you have an sorted array of records. assume that the length of the array (n) is known. give two different methods to search for a specific value in this array. you can use english or pseudo-code for your algorithm. what is the time complexity for each algorithm and why?
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, MalikaJones
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
You know the right answer?
LAB: Triangle area comparison (classes) Given class Triangle (in file Triangle java), complete main)...

Questions in other subjects: