Ross and Emily - Time#4
Conversation
… that the method is working properly.
beccaelenzil
left a comment
There was a problem hiding this comment.
Great work on this assignment! It is clear that the learning goals around TDD, inheritance, and object composition were met. In particular, nice job implementing the optional features and writing comprehensive tests for this. One thing to note is you could use more tests for the edge case on the passenger methods. Keep up the hard work.
| end | ||
|
|
||
| # You add tests for the net_expenditures method | ||
| it "will return the total cost for all trips made by the passenger" do |
There was a problem hiding this comment.
These tests are good, but a few more are needed. What happens if a passenger has zero trips? What happens if the passenger has trips that are in progress?
| end | ||
| end | ||
|
|
||
| describe "Request Trip method tests" do |
| return 0 | ||
| end | ||
|
|
||
| @trips.each do |trip| |
| end | ||
|
|
||
| available_drivers.each do |driver| | ||
| if driver.trips.length == 0 |
There was a problem hiding this comment.
Is there an enumerable you could use here?
OO Ride ShareMajor Learning Goals/Code Review
Testing Requirements
Overall Feedback
Additional FeedbackYour answer to the comprehension question about composition gets at this, but I want to call out this vocabulary explicitly. By composition we mean a has-a or has-many relationship. Examples in this project include "a TripDispatcher has-many Drivers, Passengers and Trips", "a Driver has-many Trips", "a Trip has-a Driver". Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
|
Assignment Submission: OO Ride Share
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
Reflection