diff --git a/ATM/.idea/compiler.xml b/ATM/.idea/compiler.xml
new file mode 100644
index 0000000..59eefac
--- /dev/null
+++ b/ATM/.idea/compiler.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ATM/.idea/encodings.xml b/ATM/.idea/encodings.xml
new file mode 100644
index 0000000..aa00ffa
--- /dev/null
+++ b/ATM/.idea/encodings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ATM/.idea/jarRepositories.xml b/ATM/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/ATM/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ATM/.idea/misc.xml b/ATM/.idea/misc.xml
new file mode 100644
index 0000000..06e8b35
--- /dev/null
+++ b/ATM/.idea/misc.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ATM/.idea/vcs.xml b/ATM/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/ATM/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ATM/.idea/workspace.xml b/ATM/.idea/workspace.xml
new file mode 100644
index 0000000..4c6400b
--- /dev/null
+++ b/ATM/.idea/workspace.xml
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "keyToString": {
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "settings.editor.selected.configurable": "preferences.keymap"
+ }
+}
+
+
+
+
+ 1665337585789
+
+
+ 1665337585789
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ATM/pom.xml b/ATM/pom.xml
new file mode 100644
index 0000000..6eca3c1
--- /dev/null
+++ b/ATM/pom.xml
@@ -0,0 +1,25 @@
+
+ 4.0.0
+
+ org.example
+ ATM
+ 1.0-SNAPSHOT
+ jar
+
+ ATM
+ http://maven.apache.org
+
+
+ UTF-8
+
+
+
+
+ junit
+ junit
+ 3.8.1
+ test
+
+
+
diff --git a/ATM/src/main/java/org/example/ATM.java b/ATM/src/main/java/org/example/ATM.java
new file mode 100644
index 0000000..8567d24
--- /dev/null
+++ b/ATM/src/main/java/org/example/ATM.java
@@ -0,0 +1,69 @@
+package org.example;
+
+import java.util.Objects;
+import java.util.Scanner;
+
+public class ATM
+{
+
+ public static void main( String[] args )
+ {
+ Scanner scanner = new Scanner(System.in);
+ Card[] cards = new Card[2];
+ cards[0] = new Card(1, "credit", "0001");
+ cards[1] = new Card(2, "debit", "1110");
+ while(true){
+ System.out.println(cards[0] + "\n" + cards[1] + "\n" + "Wsuń kartę(podaj id):");
+ int index = scanner.nextInt()-1;
+ System.out.println("brrrrrrrrr... \n Proszę podać PIN:");
+ if(!Objects.equals(scanner.next(), cards[index].getPIN())){
+ System.out.println("Zły PIN");
+ continue;
+ }
+ boolean running = true;
+ while(running) {
+ System.out.println("""
+ Wybierz co chcesz zrobić:
+ [0]Sprawdź stan konta
+ [1]Wypłać
+ [2]Wpłać
+ [3]Przelej
+ [4]Wygeneruj kod do telefoni pre-peidowej
+ [5]Koniec""");
+ int insertedAmount;
+ switch (scanner.nextInt()) {
+ case 0 -> System.out.println(cards[index].getFunds());
+ case 1 -> {
+ System.out.println("Wprowadź kwotę:");
+ insertedAmount = scanner.nextInt();
+ cards[index].withdrawFunds(insertedAmount);
+ System.out.println("ksz ksz ksz ksz...");
+ }
+ case 2 -> {
+ System.out.println("Wprowadź kwotę:");
+ insertedAmount = scanner.nextInt();
+ cards[index].addFunds(insertedAmount);
+ System.out.println("am am am...");
+ }
+ case 3 -> {
+ System.out.println("Wprowadź id karty do przelewu:");
+ int transferCard = scanner.nextInt();
+ System.out.println("Wprowadź kwotę:");
+ insertedAmount = scanner.nextInt();
+ cards[index].withdrawFunds(insertedAmount);
+ cards[transferCard - 1].addFunds(insertedAmount);
+ System.out.println("siup siup siup...");
+ }
+ case 4 -> {
+ System.out.println("Wprowadź kwotę:");
+ insertedAmount = scanner.nextInt();
+ cards[index].withdrawFunds(insertedAmount);
+ System.out.println((int) Math.floor(Math.random() * (999999999 - 111111111 + 1) + 111111111));
+ }
+ case 5 -> running = false;
+ }
+ }
+ }
+ }
+}
+
diff --git a/ATM/src/main/java/org/example/App.java b/ATM/src/main/java/org/example/App.java
new file mode 100644
index 0000000..a280164
--- /dev/null
+++ b/ATM/src/main/java/org/example/App.java
@@ -0,0 +1,9 @@
+package org.example;
+
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
diff --git a/ATM/src/main/java/org/example/Card.java b/ATM/src/main/java/org/example/Card.java
new file mode 100644
index 0000000..2359e7e
--- /dev/null
+++ b/ATM/src/main/java/org/example/Card.java
@@ -0,0 +1,45 @@
+package org.example;
+
+public class Card {
+ private final int id;
+ private final String type;
+ private String PIN;
+ int balance;
+
+ public String getType() {
+ return type;
+ }
+
+ public String getPIN() {
+ return PIN;
+ }
+
+ public int getFunds() {
+ return balance;
+ }
+
+ public void addFunds(int amount){
+ this.balance += amount;
+ }
+
+ public void withdrawFunds(int amount){
+ this.balance -= amount;
+ }
+
+ public Card(int id, String type, String PIN) {
+ this.id = id;
+ this.type = type;
+ this.PIN = PIN;
+ this.balance = 0;
+ }
+
+ @Override
+ public String toString() {
+ return "Card{" +
+ "id=" + id +
+ ", type='" + type + '\'' +
+ ", PIN='" + PIN + '\'' +
+ ", balance=" + balance +
+ '}';
+ }
+}
diff --git a/ATM/src/test/java/org/example/AppTest.java b/ATM/src/test/java/org/example/AppTest.java
new file mode 100644
index 0000000..d5f435d
--- /dev/null
+++ b/ATM/src/test/java/org/example/AppTest.java
@@ -0,0 +1,38 @@
+package org.example;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
diff --git a/ATM/target/classes/org/example/ATM.class b/ATM/target/classes/org/example/ATM.class
new file mode 100644
index 0000000..531feb8
Binary files /dev/null and b/ATM/target/classes/org/example/ATM.class differ
diff --git a/ATM/target/classes/org/example/App.class b/ATM/target/classes/org/example/App.class
new file mode 100644
index 0000000..497f44a
Binary files /dev/null and b/ATM/target/classes/org/example/App.class differ
diff --git a/ATM/target/classes/org/example/Card.class b/ATM/target/classes/org/example/Card.class
new file mode 100644
index 0000000..568989c
Binary files /dev/null and b/ATM/target/classes/org/example/Card.class differ