Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Title: Exception Handling. java Calculate "Object" "Area/Circumfrence""Data" Do I have to join al the three classes together? How do I add the main METHOD then? The programe are under. How can it then be interrupted with "throw new error();" as well give information to the user? ANSWER public class Parallelogramm { public Parallelogramm(Koordinate k1, Koordinate k2, double alpha) { public Parallelogramm(Koordinate k1, Koordinate k2, int alpha) { public double getA() { return a; } public double getB() { return b; } public double getH() { return h; } public double getAlpha() { return alpha; } public double Area() { public double Circumfrence() { } public class Rectangle extends Parallelogramm { public Rectangle(Koordinate k1, Koordinate k2) { } public class Square extends Rectangle { public Square(Koordinate k1, Koordinate k2) { } Replies: |
Sponsored Links
|