Created
December 3, 2013 21:59
-
-
Save vanmichael/7778188 to your computer and use it in GitHub Desktop.
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
require 'pry' | |
#Employee.new("Debbie", bonus: 10000000000, percentage: 100) | |
class Employee | |
# def initialize(name, options={}) | |
# @base_salary = options[:base_salary] || 0 | |
# @percentage = options[:base_salary] || 0 | |
# @base_salary = options[:base_salary] || 0 | |
# end | |
def initialize(name, base_salary=0, percentage=0, bonus=0, limit=0) | |
@name = name | |
@base_salary = base_salary | |
@percentage = percentage | |
end | |
def net_pay_per_month | |
#Each Employee is taxed at a flat rate of 30% on their gross salary | |
end | |
def gross_salary_per_month | |
#Each Employee gets a base salary | |
end | |
def get_employees | |
#Get list of employees from CSV | |
end | |
end | |
class Owner < Employee | |
#Takes 1000 monthly bonus if 250,000 is hit | |
def find_bonus | |
end | |
end | |
class CommissionSalesPerson < Employee | |
def gross_salary | |
#super + percentage on sum of sales for that month | |
end | |
def find_bonus | |
end | |
end | |
class QuotaSalesPerson < Employee | |
def gross_salary | |
#super + bonus if they hit their monthly quota | |
end | |
def find_bonus | |
end | |
end | |
class Sale | |
end | |
d = CommissionSalesPerson.new("lala", 123000, "3%") | |
binding.pry |
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 | gross_sale_value | |
---|---|---|
Bobby | 25000 | |
Groundskeeper | 20000 | |
Bobby | 20000 | |
Bobby | 40000 | |
Wiggum | 25000 | |
Wiggum | 10000 | |
Lob | 10000 | |
Lob | 10000 | |
Groundskeeper | 15000 | |
Bobby | 80000 | |
Lob | 5000 | |
Groundskeeper | 30000 |
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
User Stories | |
As human resources | |
I want to calculate the net pay | |
So that I can pay the employees | |
As human resources | |
I want to calculate the gross salary | |
So that I can track the companies expenses | |
As human resources | |
I want to load a CSV of sales | |
So that I can calculate commisions | |
As human resources | |
I want to load a CSV of the employees | |
So that I know who gets paid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment