Menu

114 Lab Triangle Area Comparison Classes Given Class Triangle File Trianglejava Complete M Q43893941

1.14 LAB: Triangle area comparison (classes) Given class Triangle (in file Triangle.java), complete main() to read and set th

1.14 LAB: Triangle area comparison (classes) Given class Triangle (in file Triangle.java), complete main() to read and set the base and height of triangle1 and of triangle2, 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 triangle1’s height, 4.0 is triangle2’s base, and 5.0 is triangle2’s height, the output is: Triangle with larger area: Base: 4.00 Height: 5.00 Area: 10.00 LAB 0/ 10 1.14.1: LAB: Triangle area comparison (classes) ACTIVITY Show transcribed image text 1.14 LAB: Triangle area comparison (classes) Given class Triangle (in file Triangle.java), complete main() to read and set the base and height of triangle1 and of triangle2, 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 triangle1’s height, 4.0 is triangle2’s base, and 5.0 is triangle2’s height, the output is: Triangle with larger area: Base: 4.00 Height: 5.00 Area: 10.00 LAB 0/ 10 1.14.1: LAB: Triangle area comparison (classes) ACTIVITY

Expert Answer


Answer to 1.14 LAB: Triangle area comparison (classes) Given class Triangle (in file Triangle.java), complete main() to read and s…

OR