|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object demo.Kolmio
public class Kolmio
Ohjelma laskee tietoja suorakulmaisesta kolmiosta. Esimerkki muotoilusta.
Constructor Summary | |
---|---|
Kolmio()
|
Method Summary | |
---|---|
static double |
hypotenuusa(double a,
double b)
Lasketaan kolmion hypotenuusan pituus Pythagoraan lauseella |
static double |
kolmionAla(double a,
double b)
Lasketaan suorakulmaisen kolmion pinta-ala |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Kolmio()
Method Detail |
---|
public static double hypotenuusa(double a, double b)
a
- 1. kateettib
- 2. katetti
#TOLERANCE=0.01 hypotenuusa(0,0) ~~~ 0.0; hypotenuusa(0,1) ~~~ 1.0; hypotenuusa(1,1) ~~~ 1.41; hypotenuusa(1,2) ~~~ 2.24; hypotenuusa(2,3) ~~~ 3.61; hypotenuusa(3,4) ~~~ 5.0; hypotenuusa(5,6) ~~~ 7.81;
public static double kolmionAla(double a, double b)
a
- 1. kateettib
- 2. katetti
#TOLERANCE=0.01 kolmionAla(0,0) ~~~ 0.0; kolmionAla(0,1) ~~~ 0.0; kolmionAla(1,1) ~~~ 0.5; kolmionAla(1,2) ~~~ 1.0; kolmionAla(2,3) ~~~ 3.0; kolmionAla(3,4) ~~~ 6.0; kolmionAla(5,6) ~~~ 15.0;
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |