Advertisement
jdalbey

Triple.java Skeleton

Apr 5th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. /**
  2.  * Triple is a pythagorean triple.
  3.  * @author YOUR NAME HERE
  4.  */
  5. public class Triple
  6. {
  7.  
  8.     /** Construct a triple from initial values for m and n.
  9.      * @param initialM the value of m
  10.      * @param initialN the value of n
  11.      * @pre Assumes initialM > 0, initialN > 0, initialM > initialN
  12.      */    
  13.     public Triple(int initialM, int initialN)
  14.  
  15.     /** Compute Side 1.
  16.      * @return the length of side 1
  17.      */
  18.     public long findSide1()
  19.  
  20.     /** Compute Side 2.
  21.      * @return the length of side 2
  22.      */
  23.     public long findSide2()
  24.    
  25.     /** Compute Side 3 (the hypotenuse).
  26.      * @return the length of the hypotenuse
  27.      */
  28.     public long findHypotenuse()
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement