Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please explain! Consider a method with the following header: public static String triangleType(int a, int b, int c) This method will return a string value

please explain!

Consider a method with the following header:

public static String triangleType(int a, int b, int c)

This method will return a string value indicating the type of triangle that results by having sides of length a, b and c. The possibilities are

  • "equilateral" (all 3 sides same length)
  • "isosceles" (2 sides same length, 3rd side different)
  • "scalene" (all sides have different length).

This method performs no input or output. That is, your code should have no statements containing next(), nextInt(), nextDouble(), print(), println() or printf().

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

Students also viewed these Databases questions