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
#Cash Register App by Van Nguyen and Dani Dewitt | |
require 'date' | |
puts "What is the amount due?" | |
amount_due = gets.chomp | |
puts "What is the amount tendered?" | |
amount_tendered = gets.chomp |
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
commit 6a2541b88856470e26b4ac65aa19e4c51a4a3483 | |
Author: Van Michael <SorryIDon'tWantCrawlers@gmail.com> | |
Date: Thu Nov 14 18:38:58 2013 -0500 | |
Did This Work | |
(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
#Van's Cash Register | |
require 'date' | |
require 'time' | |
price = 0 | |
items = [] | |
sub_total = 0 | |
def numeric?(object) |
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
#Cashier.rb | |
require './register.rb' | |
require 'pry' | |
cashier = Register.new | |
while cashier.get_sale_price != "done" | |
cashier.add_sale_price_to_list | |
cashier.calculate_sub_total |
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 Guess | |
attr_accessor :guess, :number | |
def initialize | |
@number = 50 | |
end | |
def valid_input?(input) | |
if (input !~ /\A\$?\d+(\.\d{1,2})?\z/) == false | |
return false |
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
#List Statistics by Van | |
require './statistics.rb' | |
mathmatician = Statistics.new | |
mathmatician.read_file | |
puts "" | |
mathmatician.report_average_score | |
mathmatician.report_highest_score | |
mathmatician.report_lowest_score |
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
#Cashier | |
require './register.rb' | |
puts "Welcome to James' Coffee Emporium!" | |
puts "1) Add item - $5.00 - Light Bag " | |
puts "2) Add item - $7.50 - Medium Bag" |
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
salutations = [ | |
'Mr.', | |
'Mrs.', | |
'Mr.', | |
'Dr.', | |
'Ms.' | |
] | |
first_names = [ |
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
train_times = { 1 => 2, | |
2 => 5, | |
3 => 7.5, | |
4 => 8.5, | |
5 => 9, | |
6 => 10, | |
7 => 11.5, | |
8 => 13.5, | |
9 => 14.5, |
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
require './register.rb' | |
require 'pry' | |
cashier = Register.new | |
#Load Inventory List from CSV | |
cashier.load_products("products.csv") | |
#Display Menu | |
#cashier.display_menu |
OlderNewer