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 - Dominique Taylor #29

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

Conversation

dtaylor73
Copy link

Grocery Store

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Response
What is accomplished with raise ArgumentError? It returns specific details of what needs to be changed in the code to help the user prevent the error from being raised again.
Why do you think we made the .all & .find methods class methods? Why not instance methods? because we wanted .all and .find to be methods that are embedded into the classes themselves. Also, they can't be reassigned.
Think about the relation between Order and Customer. Is this relation one-to-one, one-to-many, or something else? How does that compare to the Solar System project? It is a one-to-one relationship. Each order can have one customer. As opposed to the solar system project, where one solar system had many planets.
How is the relation between Order and Customer tracked in the CSV file? How is it tracked in your program? Why might these be different? In the order CSV file, the customer is tracked by customer id. In the program, the instance of customer is included within each instance of order. It would be confusing to include the customer's address street, city, state and zip in the order CSV file. It is easier to create a new array full of order instances that also includes an instance of the customer who placed that order.
Did the presence of automated tests change the way you thought about the problem? How? I believe it forced me to meticulously create code since I knew it must pass a test.

@dHelmgren
Copy link

Grocery Store

What We're Looking For

Feature Feedback
Baseline
Answered comprehension questions yes
Used Git Regularly I would expect to see more commits on a project of this size.
Wave 1
All provided tests pass yes
Using the appropriate attr_ for instance variables yes
Wave 2
All stubbed tests are implemented fully and pass yes
Used CSV library only in .all (not in .find) yes
Appropriately parses the product data from CSV file in Order.all yes
Order.all calls Customer.find to set up the composition relation yes
Additional Notes Solid work!

return nil
end

def self.parse_products(orders)

Choose a reason for hiding this comment

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

I like that you made a helper here!

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