diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..73f69e09 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..89827541 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..6518deee --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FirstProject.iml b/FirstProject.iml new file mode 100644 index 00000000..c90834f2 --- /dev/null +++ b/FirstProject.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/out/production/FirstProject/com/mirea/lab1/Ball.class b/out/production/FirstProject/com/mirea/lab1/Ball.class new file mode 100644 index 00000000..369546cf Binary files /dev/null and b/out/production/FirstProject/com/mirea/lab1/Ball.class differ diff --git a/out/production/FirstProject/com/mirea/lab1/Book.class b/out/production/FirstProject/com/mirea/lab1/Book.class new file mode 100644 index 00000000..16b285ea Binary files /dev/null and b/out/production/FirstProject/com/mirea/lab1/Book.class differ diff --git a/out/production/FirstProject/com/mirea/lab1/Dog.class b/out/production/FirstProject/com/mirea/lab1/Dog.class new file mode 100644 index 00000000..54981ff1 Binary files /dev/null and b/out/production/FirstProject/com/mirea/lab1/Dog.class differ diff --git a/out/production/FirstProject/com/mirea/lab1/Main.class b/out/production/FirstProject/com/mirea/lab1/Main.class new file mode 100644 index 00000000..f6d4c04b Binary files /dev/null and b/out/production/FirstProject/com/mirea/lab1/Main.class differ diff --git a/src/com/mirea/lab1/Ball.java b/src/com/mirea/lab1/Ball.java new file mode 100644 index 00000000..a728b2a7 --- /dev/null +++ b/src/com/mirea/lab1/Ball.java @@ -0,0 +1,15 @@ +package com.mirea.lab1; + +public class Ball { + private int radius; + public void setRadius(int radius) { + this.radius = radius; + } + public double getRadius() { + return radius; + } + @Override + public String toString(){ + return "Ball "+ radius; + } +} diff --git a/src/com/mirea/lab1/Book.java b/src/com/mirea/lab1/Book.java new file mode 100644 index 00000000..7fe5e456 --- /dev/null +++ b/src/com/mirea/lab1/Book.java @@ -0,0 +1,16 @@ +package com.mirea.lab1; + +public class Book { + private String name; + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + @Override + public String toString(){ + return "Book "+name; + } +} diff --git a/src/com/mirea/lab1/Dog.java b/src/com/mirea/lab1/Dog.java new file mode 100644 index 00000000..d2243c93 --- /dev/null +++ b/src/com/mirea/lab1/Dog.java @@ -0,0 +1,17 @@ +package com.mirea.lab1; + +public class Dog { + private int age; + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + @Override + public String toString(){ + return "Dog "+age; + } +} diff --git a/src/com/mirea/lab1/Main.java b/src/com/mirea/lab1/Main.java new file mode 100644 index 00000000..0bdf16eb --- /dev/null +++ b/src/com/mirea/lab1/Main.java @@ -0,0 +1,18 @@ +package com.mirea.lab1; + +import java.util.Scanner; + +public class Main { + public static void main(String[] args) { + Scanner in = new Scanner(System.in); + Ball ball = new Ball(); + Book book = new Book(); + Dog dog = new Dog(); + ball.setRadius(in.nextInt()); + book.setName(in.next()); + dog.setAge(in.nextInt()); + System.out.println(ball.toString()); + System.out.println(book.toString()); + System.out.println(dog.toString()); + } +}