Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Cat.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public class Cat extends Pet {

void voice(){
System.out.println("Я кіт- Мяууу-Мяууу");
}

}
7 changes: 7 additions & 0 deletions src/Cow.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public class Cow extends Pet {

void voice(){
System.out.println("Я корова- Мууу-Мууу");
}

}
7 changes: 7 additions & 0 deletions src/Dog.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public class Dog extends Pet {

void voice(){
System.out.println("Я пес- Гаууу-Гаууу");
}

}
5 changes: 5 additions & 0 deletions src/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public class Main {

public static void main(String[] args) {
}
}
24 changes: 24 additions & 0 deletions src/MyMath.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
public class MyMath {

static final double PI = 3.14159265358979323846264338327950288;
static final double PYTHAGORASCONST = 1.41421356237309504880168872420969808;
static final double FEODORSCONST = 1.73205080756887729352744634150587237;
static final double CATALANSCONST = 0.91596559417721901505460351493238411;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shindred The words in constant's name should be split by underscore ````_```


static int rectanglePerimeter(int a, int b){
return (a + b) * 2;
}

static int trianglePerimeter(int a, int b, int c){
return a + b + c;
}

static int triangleSquare(int a, int h){
return a * h / 2;
}

static int rectangleSquare(int a, int b){
return a * b;
}
}

5 changes: 5 additions & 0 deletions src/Pet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public abstract class Pet {

abstract void voice();

}