Add class diagram
This commit is contained in:
3
img/farm_diagramm.svg
Normal file
3
img/farm_diagramm.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 14 KiB |
@ -45,13 +45,13 @@ Methoden werden über ihren Identifier aufgerufen. Alle deklarierten Parameter *
|
|||||||
|
|
||||||
```java
|
```java
|
||||||
public void main(String[] args) {
|
public void main(String[] args) {
|
||||||
int sides = 10;
|
int radius = 10;
|
||||||
int area = getSpuareArea(sides);
|
double area = getCircleArea(radius);
|
||||||
System.out.printf("The area of the square is %d", area);
|
System.out.printf("The area of the square is %d", area);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getCircleArea(double radius) {
|
public double getCircleArea(double radius) {
|
||||||
int result = 3.141 * radius * radius;
|
double result = 3.141 * radius * radius;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user