diff --git a/level3.iml b/level3.iml
new file mode 100644
index 0000000..d5c0743
--- /dev/null
+++ b/level3.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Geekbrains/Main.java b/src/Geekbrains/Main.java
new file mode 100644
index 0000000..28f4c6d
--- /dev/null
+++ b/src/Geekbrains/Main.java
@@ -0,0 +1,79 @@
+package Geekbrains;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+public class Main {
+ public static void main(String[] args) {
+ }
+}
+class ArrayTask {
+ //1
+ public static void arrToSwap(Object[] array, int a, int b) {
+ Object tmp = array[a];
+ array[a] = array[b];
+ array[a] = tmp;
+ }
+ //2
+ public ArrayList convert(T[] array) {
+ return new ArrayList<>(Arrays.asList(array));
+ }
+}
+ // 3
+ class Fruit {
+ private float weight;
+
+ public Fruit(float weight) {
+ this.weight = weight;
+ }
+
+ float getWeight() {
+ return weight;
+ }
+ }
+ class Apple extends Fruit {
+ public Apple(float weight) {
+ super(weight);
+ }
+
+ }
+ class Orange extends Fruit {
+ public Orange(float weight) {
+ super(weight);
+ }
+ }
+
+ class Box {
+ // Складываем фрукты одного типа
+ private ArrayList arrayList;
+ // конструктор на один или несколько фрутов
+ public Box() {
+ this.arrayList = new ArrayList<>();
+ }
+ public Box(T... fruits) {
+ this.arrayList = new ArrayList<>(Arrays.asList(fruits));
+ }
+ // вес
+ public float getWeight() {
+ float weight = 0.0f;
+ for (T o : arrayList) {
+ weight += o.getWeight();
+ }
+ return weight;
+ }
+ // сравнить
+ public boolean compare(Box > box){
+ return (this.getWeight()-box.getWeight() < 0.0001);
+ }
+ // добавить
+ public void add(T fruit) {
+ arrayList.add(fruit);
+ }
+ // перемещение
+ public void sprinkle(Box another) {
+ another.arrayList.addAll(arrayList);
+ arrayList.clear();
+ }
+}
+
+