Skip to content

Branches- Amal #29

Open
ashassan wants to merge 1 commit intoAda-C12:masterfrom
ashassan:master
Open

Branches- Amal #29
ashassan wants to merge 1 commit intoAda-C12:masterfrom
ashassan:master

Conversation

@ashassan
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? I wasn't going to organize it by the driver before. However, when I saw part 4, I realized all the questions were about the driver and changed it.
What was your strategy for going through the data structure and gathering information? I drew out my data structure on paper and marked what the iteration variables corresponded to on there. I used puts to verify what the values were.
What was an example of something that was necessary to store in a variable? Why was it necessary, useful, or helpful? I needed to store my data structure in a variable so that I could access it later and do calculations.
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 and some enumerables(.sum, .max_by, etc.). I didn't use .map because it returns an array and I didn't want it in that form.
Were some calculations easier than others? Why? Calculating the driver with the highest rating and the driver that made the most money was harder than the other calculations. At first, I had variables that stored the current maximum value and the driver with the current maximum. However, when I started using enumerables it became easier. I just used the max_by method

@jmaddox19
Copy link

Ride Share

What We're Looking For

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

Great job! Your code is really succinct. Great use of the different built-in methods (max_by, sum, etc.)!

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