Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaves - Elizabeth #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Leaves - Elizabeth #36

wants to merge 1 commit into from

Conversation

north108
Copy link

ride share

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What did your data structure look like at first? Did this structure evolve over time? Why? At first my data structured was rider centered. So it started with the rider's id number as the key and the rides as the hashes. Then I realized the questions were focused on the driver's data so I changed it to be driver centered.
What was your strategy for going through the data structure and gathering information? My strategy was to create hashes and the keys are the driver's ID and the values are an array. Each object in the array represents a ride and is filled with a hash of ride information.
What was an example of something that was necessary to store in a variable? Why was it necessary, useful, or helpful? I stored the rating of each ride in the variable driver_rating as I iterated through the arrays of hashes. This allowed to me store in an array so I could later find the average rating of each driver.
What kinds of iteration did you use? Did you use .map? If so, when? If not, why, or when would be a good opportunity to use it? I used .each for each iteration because I finished the project before I learned about .map. If I were to do it again, I would use .map for the total amount of money each driver made, the average rating of each driver, which driver made the most money and which driver had the highest rating.
Were some calculations easier than others? Why? All calculations were all equal. This is because I used mostly methods to do the calculation.




most_money_driver = most_profit_array.max

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work with these enumerables!

@dHelmgren
Copy link

Ride Share

What We're Looking For

Feature Feedback
Answers the comprehension questions yes
Readable code with consistent indentation and reasonable code style Yes!
Outputs the correct number of rides each driver has given yes
Outputs the total amount of money each driver has made yes
Outputs the average rating for each driver yes
Outputs which driver made the most money yes
Outputs which driver has the highest average rating yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants