Attachment 'Rettangolo.java'
Download 1 public class Rettangolo {
2
3 private double base;
4 private double altezza;
5
6 public Rettangolo(double b,double h)
7 {
8 base=b;
9 altezza=h;
10 }
11
12 public double calcolaPerimetro()
13 {
14 return (base*2 + altezza*2);
15 }
16
17 public double stampaArea()
18 {
19 return base*altezza;
20
21 }
22
23 }
Attached Files
You are not allowed to attach a file to this page.