This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
2021-11-28 11:56:03 +01:00

15 lines
373 B
Java

package C07_POO.C073_Visibilite_des_membres;
public class Exercice5 {
public static void main(String[] args) {
Triangle t = new Triangle(5, 2);
System.out.println(t.computeArea());
System.out.println(computeTriangleArea(t));
}
public static double computeTriangleArea(Triangle t){
return (t.base*t.hauteur)/2;
}
}