Project

coinstar

0.0
No commit activity in last 3 years
No release in over 3 years
GA Apprentice Code Challenge
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0

Runtime

 Project Readme

Coinstar

Build Status Code Climate Coverage Status

Installation

Add this line to your application's Gemfile:

gem 'coinstar'

And then execute:

$ bundle

Or install it yourself as:

$ gem install coinstar
Usage

Simply call coinstar as so:

$ coinstar --make_change 98

or

$ coinstar --make_cents quarters=1 dimes=2 nickels=3 pennies=4

#####Requirements

GA_Logo

Apprentice Code Challenge - "Change Machine"

Objective

Create a program that makes change using U.S. currency denominations with as few coins as possible and can calculate a total given a set of currency denominations.

Constraints
  • Use Ruby as a language
  • Adhere to object-oriented design principles
  • Use a currency set of pennies, nickels, dimes, quarters
  • The solution should exist as a public GitHub repository
  • Make a github commit for each requirement
Currency set
pennie  = 1 cents
nickel  = 5 cents
dime    = 10 cents
quarter = 25 cents
Requirements

Your program should provide for the following functionality:

  • Make change from a given amount of cents and returns a currency set
  • Make change for quantities up to 100 cents
  • Make cents from a given amount of currency and returns as a total number of cents
  • Take input from the command line
Examples
3 cents            = 3 pennies
6 cents            = 1 nickel, 1 penny
14 cents           = 1 dime, 4 pennies

2 dimes, 3 pennies = 23 cents
3 pennies          = 3 cents
Areas we evaluate
  • Simplicity/elegance of design (be prepared to discuss)
  • Maintainability (clean, code that is easy to understand and change)
  • Testing (We encourage RSpec)