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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Matlab question: use switch and anythe lottery game matches three different integer numbers between 1 and 10. winning depends on how many matching numbers are provided by a player. the player provides three different integers between 1 and 10.if there is a match of all 3 numbers, the winning $ 1000.if there is a match with 2 numbers, the winning $ 10.if there is a match of all with 1 numbers, the winning $ 1.with no match, the winning is $0.write a function lottery3 that checks three numbers provided by a player and determine the winning amount. if the user mistakenly enters same number twice/thrice and if that number matches one of the winning numbers, the code should count that number only once and display correct result. the player doesn’t have to guess the order of numbers.the input to the function lottery3 can have up to two input arguments. the first input argument is a row array numbers with 3 numbers. if the second argument input testcode is present, and is a row vector of 3 values, the function lottery3 uses the code in testcode as the three winning numbers (the test must be three different integer numbers between 1 and 10), else three different numbers will be automatically generated by testcode.the ouput should return the variable winnings and the three winning numbers in the row array winnumbers.hint: make use of the internal function any.restriction: the function must use switch-case statements to determine the winning.example #1: winning = lottery3( [1,2,1],[1,2,3])produceswinning =10example #2: [winning,winnumbers] = lottery3( [1,2,3])produceswinning =3winnumbers =8 5 3
Answers: 1
question
Computers and Technology, 22.06.2019 11:10
Which are not examples of chronic or persistent stress? moving
Answers: 1
question
Computers and Technology, 22.06.2019 17:40
Consider the simple 3-station assembly line illustrated below, where the 2 machines at station 1 are parallel, i.e., the product only needs to go through one of the 2 machines before proceeding to station 2.what is the throughput time of this process?
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Based on the current economic situation do you expect the employment demand for graduating engineers to increase or decrease? explain the basis for your answer. with a significant economic recovery, what do you think will happen to future enrollments in graduating engineering programs?
Answers: 1
You know the right answer?
LAB: Triangle area comparison (classes) Given class Triangle (in file Triangle java), complete main)...
Questions
Questions on the website: 13722367