Define a class named my454590Triangle which represents a special right triangle. A 45 45 90 triangle is a special type of isosceles right triangle where the two legs are congruent to one another and the non-right angles are both equal to 45 degrees. The ratio of the sides to the hypotenuse is always 1:1:square root of two. The y454590Triangle class contains the following: • A private double data field named side which defines the side a of a triangle. The default value is 10. • A default (or "no-argument" or "no-arg") constructor that constructs a y-45-4590Triangle object using default values. • An overloaded constructor that constructs ay-45-4590Triangle object with the given side. • A method named getsidea() which returns the side of a 45 45 90 triangle. • A method named getside() which returns the side of a 45 45 90 triangle. • A method named getsidec() which returns the sideC (e. hypotenuse) of a 45 45 90 triangle. • A method named toString() that returns a string description of the triangle in the format "My-454590Triangle(side, side, side). Write the #y-45-4590Triangle class in the answer box below. Note-keep a copy of your solution to this task because you will be extending it step by step in subsequent tasks For example: Test my454590Triangle 11 new My454590Triangle(); System.out.println(); Result my454590Triangle: (10.00, 10.00, 14.14) 10.0 10.0 14.14 System.out.println(ti.getSide()); System.out.println(t.getSide()); System.out.printf("%.2f", ti.getside()); my454590Triangle p1 new My454590Triangle(2.5); my454590Triangle p2 new My454590Triangle(2.5); false System.out.println(p2); System.out.println(pl - p2); my454590Triangle: (2.50, 2.50, 3.54)
Define a class named my454590Triangle which represents a special right triangle. A 45 45 90 triangle is a special type of isosceles right triangle where the two legs are congruent to one another and the non-right angles are both equal to 45 degrees. The ratio of the sides to the hypotenuse is always 1:1:square root of two. The y454590Triangle class contains the following: • A private double data field named side which defines the side a of a triangle. The default value is 10. • A default (or "no-argument" or "no-arg") constructor that constructs a y-45-4590Triangle object using default values. • An overloaded constructor that constructs ay-45-4590Triangle object with the given side. • A method named getsidea() which returns the side of a 45 45 90 triangle. • A method named getside() which returns the side of a 45 45 90 triangle. • A method named getsidec() which returns the sideC (e. hypotenuse) of a 45 45 90 triangle. • A method named toString() that returns a string description of the triangle in the format "My-454590Triangle(side, side, side). Write the #y-45-4590Triangle class in the answer box below. Note-keep a copy of your solution to this task because you will be extending it step by step in subsequent tasks For example: Test my454590Triangle 11 new My454590Triangle(); System.out.println(); Result my454590Triangle: (10.00, 10.00, 14.14) 10.0 10.0 14.14 System.out.println(ti.getSide()); System.out.println(t.getSide()); System.out.printf("%.2f", ti.getside()); my454590Triangle p1 new My454590Triangle(2.5); my454590Triangle p2 new My454590Triangle(2.5); false System.out.println(p2); System.out.println(pl - p2); my454590Triangle: (2.50, 2.50, 3.54)
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Python code and output screenshot is must

Transcribed Image Text:Define a class named My454590Triangle which represents a special right triangle. A 45 45 90 triangle is a special type of isosceles right triangle where
the two legs are congruent to one another and the non-right angles are both equal to 45 degrees. The ratio of the sides to the hypotenuse is always
1:1:square root of two. The My454590Triangle class contains the following:
A private double data field named sided which defines the side a of a triangle. The default value is 10.
A default (or "no-argument" or "no-arg") constructor that constructs ay454590Triangle object using default values.
An overloaded constructor that constructs a My454590Triangle object with the given side.
A method named getsideA() which returns the side
of a 45 45 90 triangle.
A method named getsides() which returns the side of a 45 45 90 triangle.
A method named getsidec() which returns the sidec (.e. hypotenuse) of a 45 45 90 triangle.
• A method named toString() that returns a string description of the triangle in the format "My454590Triangle:(sideA, sideß, sideC)".
Write the My454590Triangle class in the answer box below. Note-keep a copy of your solution to this task because you will be extending it step by
step in subsequent tasks.
For example:
Test
My454590Triangle t1 new My454590Triangle();
System.out.println(t1);
System.out.println(t1.getSide());
System.out.println(t1.getSideB());
System.out.printf("%.2f", t1.getSideC());
Hy454590Triangle pl = new My454590Triangle (2.5);
My454590Triangle p2 new My454590Triangle (2.5);
System.out.println(p2);
System.out.println(pl - p2);
Result
My454590Triangle: (10.00, 10.00, 14.14)
10.0
10.0
14.14
My454590Triangle: (2.50, 2.50, 3.54)
false
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 3 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education