How to implement more classes

I have recently been assigned some java projects using OOP.
I have completed a project for an ATM however I have been told it’s not true OOP.

import java.util.Scanner;
import java.util.Date;

public class Machine {

    private static Scanner in; 
    private static float balance = 0; // initial balance to 0 for every user
    private static int anotherTransaction;
    private static int serialno = 432198654;
    private static String location = "Chippenham";

    public static void main(String args[]) {
        in = new Scanner(;

        // call the transaction method here if the pin is correct 
        for (int i= 0; i < 3; i++) {    //for loop for 3x pin attempts
            int pin = 1234;
            int user_pin;
            System.out.println("Please enter your pin: ");
            user_pin = in.nextInt();
            if (user_pin == pin) {
                i = i+3;
            else if (i==2) {
                System.out.println("Account locked.");
            else {
                System.out.println("Incorrect pin. Please try again.");


private static void transaction() {
    // this is the main method
    int choice; 

    System.out.println("Please select an option"); 
    System.out.println("1. Withdraw");
    System.out.println("2. Deposit");
    System.out.println("3. Balance");

    choice = in.nextInt();

    switch(choice) {
        case 1: //withdrawal 
            Date date = new Date();
            float amount; 
            System.out.println("Please enter amount to withdraw: "); 
            amount = in.nextFloat();

            if(amount > balance || amount == 0){
                System.out.println("You have insufficient fundsnn"); 
                anotherTransaction(); // ask if they want another transaction
            } else {
                // update balance 
                balance = balance - amount; 
                System.out.println("You have withdrawn "+amount+" and your new balance is "+balance+"n");
                System.out.println("Priting Receipt...");
                try {
                catch(InterruptedException ex)

            System.out.println("Withdrawal amount: "+amount);

        case 2:
            // depositing
            float deposit; 
            System.out.println("Please enter amount you would wish to deposit: "); 
            deposit = in.nextFloat();
            // update balance 
            balance = deposit + balance;
            System.out.println("You have deposited "+deposit+" new balance is "+balance+"n");

        case 3:
            // check balance 
            System.out.println("Your balance is "+balance+"n");

        default:   //if no case values match, resort to default
            System.out.println("Invalid option:nn"); 

    private static void anotherTransaction() {
        System.out.println("Do you want another transaction?nnPress 1 for another transactionn2 To exit");
        anotherTransaction = in.nextInt();
        if(anotherTransaction == 1){
            transaction(); // call transaction method
        } else if(anotherTransaction == 2){
            System.out.println("Thank you. Good Bye.");
        } else {
            System.out.println("Invalid choicenn");

How would I change this code to use more classes?
I was thinking a class for input, a bank (for storing pin and balance), a card class etc.

But I have no idea how to use each of these classes together.