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

Time - Emily #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Time - Emily #42

wants to merge 1 commit into from

Conversation

snowistaken
Copy link

@snowistaken snowistaken commented Mar 13, 2020

…rect fork

Assignment Submission: Hotel

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

Reflection

Question Answer
What was a design challenge that you encountered on this project? The biggest design challenge that I faced in this project was making the decision on having a room class and a daterange class. Ultimately I decided to just include a room class.
What was a design decision you made that changed over time over the project? Initially I had not planned to create a block class. However, when it came time to implement the block features I realized that the class required more responsibility than I was comfortable adding to the reservation class. I compromised on this issue by making the block class a child class of reservation.
What was a concept you gained clarity on, or a learning that you'd like to share? I definitely gained clarity on the concept of inheritance vs. composition. It makes more sense to me now which circumstances I should use inheritance and which I should use composition.
What is an example of a nominal test that you wrote for this assignment? What makes it a nominal case? One example of a nominal case in my code is the test that verifies that each of my classes can be instantiated properly with expected values.
What is an example of an edge case test that you wrote for this assignment? What makes it an edge case? An example of an edge case test in my code is the test that ensures that an argument error will be raised in the case that all 20 rooms are booked for a given date.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? I feel that having a clear idea of how I would like to approach the structure of my code prior to starting to write it helped significantly in staying logical about what to do when writing the actual code. I felt good about this benefit.

@snowistaken snowistaken changed the title Moved all files over from original hotel directory to push to the cor… Time - Emily Mar 13, 2020
@jmaddox19
Copy link

jmaddox19 commented Mar 14, 2020

Hotel

Section 1: Major Learning Goals

Criteria yes/no, and optionally any details/lines of code to reference
Practices SRP by having at least two separate classes with distinct responsibilities, and test files for these two classes ✔️
Overall, demonstrates understanding instance variables vs. local variables. (There aren't unnecessarily too many instance variables, when it should be a local variable) ✔️
For each test file, tests demonstrate an understanding of instantiating objects properly, and using Arrange-Act-Assert ✔️
Practices pseudocode and TDD, and reflected on it by filling out the reflection questions ✔️
Practices git with at least 15 small commits and meaningful commit messages I believe so, but not from my view because of the issues we had pushing to the proper fork.

Section 2: Code Review and Testing Requirements

Criteria yes/no, and optionally any details/lines of code to reference
There is a class that represents a reservation, and a second class that holds/manages a collection of reservations through composition (instance variable) ✔️
The logic for checking if a reservation's date overlaps with another reservation's date is complex logic that is separated into method(s) (and potentially class(es)) No, because the solution is just that succinct!
The logic for checking if a reservation's date overlaps with another reservation's date has unit tests
All of the given tests run and pass 8 tests are failing for me. The failures look related. "Minitest::UnexpectedError: TypeError: wrong element type Hotel::Room at 0 (expected array) /Users/jared/Developer/c13/projects/hotel/lib/block.rb:14:in `to_h'"
A test coverage tool is installed and used, and shows 95% test coverage Installed but I can't see the results because of the errors

Section 3: Feature Requirements

Feature Requirement: There is a method that... yes/no
gives back a list of rooms, and it's tested ✔️
creates a specific reservation for a room for a given date range, and it has nominal test cases ✔️
creates a specific reservation for a room for a given date range, and it tests an edge case, such as no available room, or invalid date range ✔️
gives back a list of reservations on a given date. Its tests include a test that makes several reservations for a given date ✔️
calculates the total price for a reservation ✔️
gives back a list of available rooms for a given date range, and it has nominal test cases ✔️
gives back a list of available rooms for a given date range, and it has edge test cases, such as no available room, or invalid date range
creates a block of rooms ✔️
reserves a room from a block ✔️

Overall Feedback

Great work overall! Please do review all the feedback here. I hope it's helpful.

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 14+ total in all sections ✔️
Yellow (Approaches Standards) 9-13 total in all sections
Red (Not at Standard) 0-8 total in all sections, or assignment is breaking/doesn’t run with less than 5 minutes of debugging

Additional Feedback

Great work overall! You've built your first project with minimal starting code. This represents an incredible milestone in your journey, and you should be proud of yourself!

I am particularly impressed by the way that you organized all your classes so thoughtfully.

I do see some room for improvement around ensuring all tests pass before submission, if you have the time.

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
Descriptive/Readable
Concise
Logical/Organized


private

def verify_date(stay_begin, stay_end)

Choose a reason for hiding this comment

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

Very cool that you made this a separate method!

end

def overlapping?(first, last)
@stay_begin <= last && first <= @stay_end

Choose a reason for hiding this comment

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

These seems to cover every case and I actually can't believe it! I don't think anyone has written something so simple for this before, student or instructor.

Choose a reason for hiding this comment

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

That said it would make me feel much more confident in this if there were thorough unit test coverage for it. I don't see any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants