added ws202425 courses

This commit is contained in:
2024-11-14 13:11:04 +01:00
parent 800282c2e8
commit beb31897b1
461 changed files with 20368 additions and 0 deletions
@@ -0,0 +1,29 @@
/** Bindung.java
*
* Eine Klasse, die am Beispiel des figure-Pakets
* statische und dynamische Typen ausprobiert
*/
import figure.*;
class Bindung {
public static void main(String[] args) {
Figure f = new Square();
f.moveTo(2,3);
f.area();
f.show();
if (f instanceof Square) {
((Square)f).show(); // analog: (double)17
}
System.out.println("Flaecheninhalt: " + f.area());
f = new Circle(10);
System.out.println("Flaecheninhalt: " + f.area());
}
}
// Bindung