We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 6 columns, instead of 3 in line 1.
This file contains hidden or 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
last_name,first_name,base_salary,percentage,bonus,limit | |
Smith,Johnny,80000 | |
McMahon,Jimmy,85000 | |
Lob,Bob,50000,0.5 | |
Bobby,Ricky,40000,1.5 | |
Krabappel,Edna,87000 | |
Groundskeeper,Willie,75000,0,5000,60000 | |
Wiggum,Clancy,80000,0,10000,80000 | |
Burns,Charles,500000,0,1000,0 |
This file contains hidden or 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 Animal | |
def initialize(name) | |
@name = name | |
end | |
def emote | |
"#{@name} " | |
end |
This file contains hidden or 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 'pry' | |
class Circle | |
def initialize(radius) | |
@radius = radius | |
end | |
def diameter | |
2 * @radius |
This file contains hidden or 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 Whiteboard | |
attr_accessor :contents | |
def initialize(contents = []) | |
@contents = contents | |
end | |
#instance method to erase whiteboard | |
def erase_whiteboard | |
@contents = [] |
This file contains hidden or 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 Card | |
def initialize(rank, suit) | |
@suit = suit | |
@rank = rank | |
end | |
def rank | |
@rank | |
end | |
This file contains hidden or 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 television | |
def initialize(model, size, color) | |
@model = model | |
@size = size | |
@color = color | |
end | |
end | |
class channel(number,broadcaster) | |
def initialize(number,broadcaster) |
This file contains hidden or 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 Card | |
def initialize(rank = nil, suit = nil) | |
if suit.nil? | |
@suit = ['♠', '♣', '♥', '♦'].sample | |
else | |
@suit = suit | |
end | |
if rank.nil? | |
@rank = ['2','3','4','5','6','7','8','9','10','J','Q','K'].sample | |
else |
This file contains hidden or 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
#By Van and Collin | |
require './register.rb' | |
require 'pry' | |
cashier = Register.new | |
cashier.load_products("products.csv") | |
while cashier.get_selection != 'done' | |
if cashier.menu_selection == '1' | |
while cashier.get_item != 'done' do |
This file contains hidden or 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
#The Change Machine | |
#by van | |
class Change | |
attr_reader :dollars, :quarters, :dimes, :pennies, :change | |
def initialize | |
get_amount_due | |
get_amount_tendered |
This file contains hidden or 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 'pry' | |
class House | |
attr_reader :character, :house, :selection | |
def initialize | |
@characters = { | |
"Tyrion Lannister" => "House Lannister", | |
"Jon Snow" => "Night's Watch", |