Skip to content

SophieSjoberg/ATM_Challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My ATM Challenge at CraftAcademy bootcamp week 1

Assignment

Create an app that simulates an ATM machine with withdraw and deposit functions.

Install

I added rspecto Gemfile and ran $ bundle install

How to use application

Open irb in your terminal and run the following commands:

load './lib/atm.rb'

load './lib/person.rb'

Create Person person = Person.new({name: 'Sophie'})

Create Account account = person.create_account

Create ATM atm = Atm.new

Deposit money person.deposit(100)

Withdraw money (using pin generated from creating account)

person.withdraw({amount:50, account:account, atm:atm, pin:'1234'})

Check balance account account.balance

Check balance of the ATM atm.funds

Resources

CraftAcademy course material, coaches, google and Stackoverflow.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages