Question: / * * * * @author Alexandra Vaschillo * / public class TwoMethodsA 0 2 { / * * * Method checks if a triangle
@author Alexandra Vaschillo
public class TwoMethodsA
Method checks if a triangle with given lengths of sides is a right triangle
@param a triangle side
@param b triangle side
@param c triangle side
@return true if the triangle is right, false if it is not
public static boolean isRightTriint a int b int c
return false;
The method takes hour, minute, and ampm components of the time stamp of the moment when car crosses the bridge and calculates the toll rate.
If any of the time stamp components are invalid, is being returned as an error code.
@param hour hour component of the time stamp
@param min minute component of the time stamp
@param amPm either string am or pm component of the time stamp
@return the toll rate for the passed time
public static double tollBridgeint hour, int min, String amPm
return ;
public static void testIsRightTri
Test
ifisRightTri System.out.printlnTest for isRightTri PASSED";
else System.out.printlnTest for isRightTri Failed";
Test
ifisRightTri System.out.printlnTest for isRightTri PASSED";
else System.out.printlnTest for isRightTri Failed";
Test
ifisRightTri System.out.printlnTest for isRightTri PASSED";
else System.out.printlnTest for isRightTri Failed";
Test
ifisRightTri System.out.printlnTest for isRightTri PASSED";
else System.out.printlnTest for isRightTri Failed";
Test
ifisRightTri System.out.printlnTest for isRightTri PASSED";
else System.out.printlnTest for isRightTri Failed";
Test
ifisRightTri System.out.printlnTest for isRightTri PASSED";
else System.out.printlnTest for isRightTri Failed";
Test
ifisRightTri System.out.printlnTest for isRightTri PASSED";
else System.out.printlnTest for isRightTri Failed";
public static void testTollBridge
final double OFFPEAK ;
final double LOWRUSH ;
final double RUSHHOURS ;
final double MIDDAY ;
Test
iftollBridgeaa System.out.printlnTest for tollBridge PASSED";
else System.out.printlnTest for tollBridge Failed";
Test
iftollBridgeam System.out.printlnTest for tollBridge PASSED";
else System.out.printlnTest for tollBridge Failed";
Test
iftollBridgeam && tollBridgeam System.out.printlnTest for tollBridge PASSED";
else System.out.printlnTest for tollBridge Failed";
Test
iftollBridgeamOFFPEAK && tollBridgeam OFFPEAK &&tollBridgeam OFFPEAK System.out.printlnTest for tollBridge PASSED";
else System.out.printlnTest for tollBridge Failed";
Test
iftollBridgeamLOWRUSH && tollBridgeam LOWRUSH && tollBridgeam LOWRUSH System.out.printlnTest for tollBridge PASSED";
else System.out.printlnTest for tollBridge Failed";
Test
iftollBridgeamRUSHHOURS && tollBridgeam RUSHHOURS && tollBridgeam RUSHHOURS System.out.printlnTest for tollBridge PASSED";
else System.out.printlnTest for tollBridge Failed";
Test
iftollBridgeamMIDDAY && tollBridgepm MIDDAY && tollBridgepmMIDDAY System.out.printlnTest for tollBridge PASSED";
else System.out.printlnTest for tollBridge Failed";
Test
iftollBridgepmRUSHHOURS && tollBridgepmRUSHHOURS && tollBridgepmRUSHHOURS System.out.printlnTest for tollBridge PASSED";
else System.out.printlnTest for tollBridge Failed";
Test
iftollBridgepmLOWRUSH && tollBridgepmLOWRUSH && tol
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
