diff --git a/rideshare.rb b/rideshare.rb new file mode 100644 index 0000000..b70e0a9 --- /dev/null +++ b/rideshare.rb @@ -0,0 +1,112 @@ +# So, I couldn't find my original file where I commented out the beginning explaing some issues +# I was having and explained that most of my code was broken and +# commented out as well, this is just my data structure and some notes +# I must have saved it somewhere weird, but either way, my code +# to turn in was broken + +driver_id = { + dr001: [ + { + date: "3rd Feb 2016", + cost: 10.00, + rider_id: "RD0003", + rating: 3, + }, + { + date: "3rd Feb 2016", + cost: 30.00, + rider_id: "RD0015", + rating: 4, + }, + { + date: "5th Feb 2016", + cost: 45.00, + rider_id: "RD0003", + rating: 2, + } + ], + dr002: [ + { + date: "3rd Feb 2016", + cost: 25.00, + rider_id: "RD0073", + rating: 5, + }, + { + date: "4th Feb 2016", + cost: 15.00, + rider_id: "RD0013", + rating: 1 , + }, + { + date: "5th Feb 2016", + cost: 35.00, + rider_id: "RD0066", + rating: 3, + } + ], + dr003: [ + { + date: "4th Feb 2016", + cost: 5.00, + rider_id: "RD0066", + rating: 5, + }, + { + date: "5th Feb 2016", + cost: 50.00, + rider_id: "RD0003", + rating: 2, + } + ], + dr004: [ + { + date: "3rd Feb 2016", + cost: 5.00, + rider_id: "RD0022", + rating: 5, + }, + { + date: "4th Feb 2016", + cost: 10.00, + rider_id: "RD0022", + rating: 4, + }, + { + date: "5th Feb 2016", + cost: 20.00, + rider_id: "RD0073", + rating: 5, + } + ] +} + + +# number of rides each driver has given + + + +# driver_id.each do |rides| + +# end + + + +# total amount of money each driver has made +# total_money = [] + +# driver_id[dr001][1][:cost] + + +# average rating for each driver +# average_rating = [] + + + +# which driver made the most money +# total money + + + +# which driver has the highest average rating +highest_average_rating