Skip to content

Alice B. & Jing#15

Open
Jing-321 wants to merge 50 commits intoAda-C14:masterfrom
Jing-321:master
Open

Alice B. & Jing#15
Jing-321 wants to merge 50 commits intoAda-C14:masterfrom
Jing-321:master

Conversation

@Jing-321
Copy link

@Jing-321 Jing-321 commented Dec 3, 2020

Assignment Submission: Video Store API

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

If you didn't get to the functionality the question is asking about, reply with what you would have done if you had completed it.

Reflection

Prompt Response
Explain how you came up with the initial design of your ERD, based on the seed data and reading through the API endpoints We just went through the cvs files, recognize the attributes of each class and add their respective relationships.
What would be the Big-O time complexity of your /customers & /videos endpoints? What does the time complexity depend on? Explain your reasoning. O(n). n is the quantity of the customer or video in the database. We use find_by to iterate through each customer or video.
What is the Big-O time complexity of the POST /rentals/check-in endpoint? What does the time complexity depend on? Explain your reasoning. O(n). Similar to index and show, check-in and check-out use find_by to find the corresponding customer and video, and then create a new rental.
Describe a specific set of positive and negative test cases you implemented for a model. We tested create a customer and video with all valid data, and with invalid data for negative cases.
Describe a specific set of positive and negative test cases you implemented for a controller. We tested checkin and checkout with all valid params. For negative cases, we tested the cases when each id(customer_id, video_id) is nil.
Broadly, describe how an API should respond when it handles a request with invalid/erroneous parameters. Respond with :not_found or :bad_request with error messages.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. We did not do model methods. Checkin and checkout are all in controller.

Alice Boone and others added 30 commits December 1, 2020 15:36
add index method in customer controller
complete index method in customer
create create method and pass the test
fix bug pass test for create in video
relate rental to video and customer
add validation to rental
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

Comments