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, 23.06.2019 07:10
If you want to import a picture into a dtp application, what must you do first? draw an image frame. import text. open the folder containing the file. select get image… from the windows menu.
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Examine the list below. which factors positively affect lifetime income? check all that apply.
Answers: 1
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
You know the right answer?
LAB: Triangle area comparison (classes) Given class Triangle (in file Triangle java), complete main)...
Questions
question
History, 12.10.2020 21:01
question
Mathematics, 12.10.2020 21:01
question
Mathematics, 12.10.2020 21:01
Questions on the website: 13722363