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

Earth - Ting-Yi and Sophie - OO Ride Share #3

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

steve-messing
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 went well! We found it confusing at first, but watching Simon's demo helped a lot.
What inheritance relations exist between classes? CsvRecord is the parent class for Passenger, Trip and Driver classes.
What composition relations exist between classes? TripDispatcher is a composition file, linking passengers, drivers and trips and allowing them to interact and see each other.
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 how to handle calculating averages and totals stats for drivers and passengers with trips-in-progress. Make them raise an error and refuse to calculate? Or factor in nil values as 0 and handle trips.length to find averages and totals up until the trip in progress? We decided to handle nil values as 0, because in the real world, you would still be able to access driver information (i.e. average rating) even if they have a trip in progress.
Give an example of a template method that you implemented for this assignment add_trip is a template method that's used in both passenger, driver and trip_dispatcher.
Give an example of a nominal test that you wrote for this assignment
it "can calculate the total time spent for each passenger" do
  expect(@passenger.total_time_spent).must_equal 4800
end

Give an example of an edge case test that you wrote for this assignment |
it "raises an error for no driver available" do
array = [6, 7, 3]

  expect{
    array.each do |pass|
      @dispatcher.request_trip(pass)
    end}.must_raise ArgumentError
end

What is a concept that you gained more clarity on as you worked on this assignment | Object relations - how to use and access objects that are stored in or related to objects from other classes, and how to write tests!

@steve-messing steve-messing changed the title Ting-Yi and Sophie Earth - Ting-Yi and Sophie - OO Ride Share Oct 1, 2020
Copy link

@dHelmgren dHelmgren left a comment

Choose a reason for hiding this comment

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

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 inheritance. 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 ✔️

Testing Requirements

a

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 ✔️
Yellow (Approaches Standards) 6+ in Code Review && 2+ in Functional Requirements
Red (Not at Standard) 0-5 in Code Review or 0,1 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging

Code Style Bonus Awards

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

Quality Yes?
Elegant/Clever
Descriptive/Readable

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