A Ruby web app that calculates the cost of shipping parcels.
- Clone this repository
- Run
bundle install
in the project root. - Run
ruby app.rb
- Open
localhost:4567
in your web browser
- Program determines volume of a parcel based on its dimensions.
- Example Input: 3, 3, 3
- Example Output: 27
- Program determines cost to ship of a parcel based on the following:
- Program returns a base cost of 2 dollars.
- Example Input: Weight: 0, Volume: 1, Shipping: "Standard"
- Example Output: 2
- Program adds 1 dollar for each pound the parcel weighs.
- Example Input: Weight: 3, Volume: 1, Shipping: "Standard"
- Example Output: 5
- Program adds 1 dollar for each cubic foot of volume greater than 1 cubic foot
- Example Input: Weight: 0, Volume: 3, Shipping: "Standard"
- Example Output: 4
- Program adds 10 dollars for 2-day shipping.
- Example Input: Weight: 0, Volume: 1, Shipping: "2-Day"
- Example Output: 12
- Program adds 20 dollars for next-day shipping.
- Example Input: Weight: 0, Volume: 1, Shipping: "Next-Day"
- Example Output: 22
- Program adds $.50 for each square foot of surface area if user requests gift-wrapping services.
- Example Input: Weight: 2, Surface-area: 6, Volume: 2, Shipping: "Standard", Gift-wrapping: true
- Example Output: 6
- Program returns a base cost of 2 dollars.
Please contact [email protected] with questions, comments, or issues.
- Ruby
- Sinatra
Copyright (c) 2017 Kelsey Langlois and Megan Olson
This software is licensed under the MIT license.