Skip to content

A challenge create your own solution for figuring out the cost of a cup of coffee.

Notifications You must be signed in to change notification settings

example-apps/coffee_decorator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

coffee_decorator

This is a code challenge anyone can join in. The goal is to create your own solution for figuring out the cost of a cup of coffee.

Example

  • The cost of coffee is $2.00
  • To add cream to your coffee is 20% of the cost of the cofee
  • To add sugar to the coffee it is $0.50

If you had a coffee with everything it would cost $2.90

If you only wanted coffee and cream it would be $2.40

Requirements

  • solution must accept additions of up 3 different ingredients that would make up your custom coffee
  • ingreditents can have a set value but at least one ingreditent should be a percentage
  • solution should give total cost of the coffee for n number of ingreditents.
  • solution should be an implemination of a decorator pattern

Resources:

ThoughtBot

Wikipedia

Submission

They are due by End of Day June 14th. Then the next challenge will be listed.

To create a sumbission:

  • fork this repo into your personal github account.
  • in the new repo on your account create a folder with your name and develop your solution.
  • once done submit a pull request back into this repo
  • bask in the glory of you contributing code

Also rspec tests are enouraged highly.

  • If you want an easy way to get started with rsepc and some other starter files feel free to clone this repo

About

A challenge create your own solution for figuring out the cost of a cup of coffee.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages