This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package shapes; | |
import java.awt.Graphics; | |
import java.awt.Color; | |
/** | |
* @author - Jeong Min Kim u0264416 | |
* @version - 3/14/2017 | |
* @pre_condition you need 6 int values | |
* @post_condition you get back an object that is initially 200 pixels in width and 100 in height. It will move on a timer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CartController < ApplicationController | |
def add | |
id = params[:id] | |
if session[:cart] then # if a cart has already been created, use it, otherwise make a new one | |
cart = session[:cart] | |
else | |
session[:cart] = {} | |
cart = session[:cart] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CartController < ApplicationController | |
def add | |
id = params[:id] | |
if session[:cart] then # if a cart has already been created, use it, otherwise make a new one | |
cart = session[:cart] | |
else | |
session[:cart] = {} | |
cart = session[:cart] | |
end |