Skip to content

Conversation

@seaweeddol
Copy link

Assignment Submission: OO Ride Share

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

Reflection

Question Answer
How did getting up to speed on the existing codebase go? If it went well, what worked? If it didn't go well, what will you do differently next time? It was difficult to figure out what was happening with so many different files. What helped was each of us going through the files on our own, and then coming together with questions and discussing with each other. We would do the same process next time - the scope of the project is what made it difficult, not our process.
What inheritance relations exist between classes? Driver, Passenger, and Trips are all children of CsvRecord.
What composition relations exist between classes? The TripDispatcher has Drivers, Passengers, and Trips. Each Passenger and Driver has Trips. Each Trip has a Passenger and a Driver.
Describe a decision you had to make when working on this project. What options were you considering? What helped you make your final decision? One decision we made was while writing code, we knew that we could write it cleaner, but chose to get it out first and go back and refactor later. This helped us figure out the logic of the code without worrying too much about writing in the most concise way. We also decided to have a 20 minute timer for each person - this was especially useful with a group of three because it allowed everyone to have a chance at being the driver.
Give an example of a template method that you implemented for this assignment We implemented the from_csv method in the Driver and Passenger classes. This was a template method in the CsvRecord class.
Give an example of a nominal test that you wrote for this assignment We wrote a test to calculate the total revenue of all trips for the Driver class.
Give an example of an edge case test that you wrote for this assignment We wrote a test to account for the possibility of a driver having 0 trips, so it would return a total_revenue of 0.
What is a concept that you gained more clarity on as you worked on this assignment Relationships between classes (inheritance). Also that organization is very important as a program becomes bigger. Additionally, the importance of having tests, especially as you have more data - it's not as feasible to test with puts statements.

vnikki13 and others added 30 commits February 24, 2020 16:42
@CheezItMan
Copy link

CheezItMan commented Mar 2, 2020

OO Ride Share

Major Learning Goals/Code Review

Criteria yes/no, and optionally any details/lines of code to reference
The code demonstrates individual learning about Time and the responsibility of Trip.from_csv, and uses Time.parse in Trip.from_csv ✔️
The code demonstrates breaking out complex logic in helper methods, such as making a helper method in Trip to calculate duration ✔️
There are tests for the nominal cases for the Passenger#net_expenditures and Passenger#total_time_spent ✔️
There is at least one edge case test for either Passenger#net_expenditures or Passenger#total_time_spent testing if the passenger has no trips ✔️
Practices inheritence. Driver inherits from CsvRecord, and implements from_csv ✔️
Employs problem-solving and implements Driver#average_rating and Driver#total_revenue ✔️
Implements the TripDispatcher#request_trip, which creates an instance of Trip with a driver and passenger, adds the new trip to @trips, and changes the status of the driver ✔️
Practices composition. In TripDispatcher#request_trip, the driver gets connected to the new trip, the passenger gets connected to the new trip ✔️
Practices git with at least 10 small commits and meaningful commit messages ✔️, I like how you had good granular commits, you also had good commit messages.

Testing Requirements

Testing Requirement yes/no
There is reasonable test coverage for wave 1, and all wave 1 tests pass ✔️
There is reasonable test coverage for wave 2, and all wave 2 tests pass ✔️
Wave 3: Tests in wave 1 and wave 2 explicitly test that only completed trips should be calculated (and ignore in-progress trips) ✔️
There is reasonable test coverage for TripDispatcher#request_trip, and all tests pass ✔️

Overall Feedback

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 8+ in Code Review && 3+ in Functional Requirements ✔️

Code Style Bonus Awards

Was the code particularly impressive in code style for any of these reasons (or more...?)

Quality Yes?
Perfect Indentation
Elegant/Clever ✅, nice work using enumerables!
Descriptive/Readable
Concise
Logical/Organized

Summary

Nice work, you hit all the learning goals here. Great work on getting wave 4 working as well. Excellent work.

@passenger.add_trip(trip2)
end

describe "net_expenditures" do

Choose a reason for hiding this comment

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

You should also go back and add tests for incomplete trips.

expect(@driver.total_revenue).must_equal 0
end

it "returns accurate drivers revenue when in progress trips" do

Choose a reason for hiding this comment

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

Nice!

picked_driver = ""
oldest_end_time = Time.now

available_drivers.each do |driver|

Choose a reason for hiding this comment

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

Awesome!

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.

3 participants