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 - Alice #32

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

Leaves - Alice #32

wants to merge 6 commits into from

Conversation

sun-alice
Copy link

Grocery Store

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Response
What is accomplished with raise ArgumentError? It stops the program where the error occurred and displays the error message that was set.
Why do you think we made the .all & .find methods class methods? Why not instance methods? '.all' and '.find' were made class methods because they were methods that related to the class, not an instance.
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? The relation between order and customer is one to many (one customer to many orders). Solar system was the same, one solar system to 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 CSV file, the relation between order and customer is the customer ID. In the program, a customer instance is stored in an order instance. These may be different because with the customer instance being stored, the information on the customer can be easily accessed, compared to the CSV where the customer ID doesn't provide much information.
Did the presence of automated tests change the way you thought about the problem? How? I think the presence of automated tests made it easier for me to write and test the code. I was able to look at the tests to get a better understanding of what my data should look like.


class Order
attr_reader :id
attr_accessor :products, :customer, :fulfillment_status

Choose a reason for hiding this comment

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

Do all of these need to be accessors?

@dHelmgren
Copy link

Grocery Store

What We're Looking For

Feature Feedback
Baseline
Answered comprehension questions yes
Used Git Regularly yes
Wave 1
All provided tests pass yes
Using the appropriate attr_ for instance variables mostly see comment
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! See comments for where it might be improved.

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