Where is error? 5/7


#1
class Account
    attr_reader :name
    attr_reader :balance
    
    def initialize(name, balance=100)
        @name = name
        @balance = balance
    end
    private
    
    def pin
        @pin = 1234
    end
    
    def pin_error
        return "Access denied: incorrect PIN."
    end
    
    public
    def display_balance(pin_number)
        if pin_number == pin 
           puts "Balance: $#{@balance}."
       
    else
        pin_error
    end
    
    public
    def withdraw(pin_number, amount)
    if pin_number == pin
      @balance -= amount
      puts "Withdrew #{amount}. New balance: $#{@balance}."
    else
      puts pin_error
    end
  end
    
    end
end

#2

method def display_balance want: end to finish method
method def withdraw not want end
Moreover public method should be front of private method to no use more public
class Account
...
public
def display_balance
end
def withdraw(pin_number. amount)
end
private
def pin
end
def pin_error
end


#3

can u tell me how to align?