Skip to content

Caroline Nardi - Hotel - Octos#29

Open
cmn53 wants to merge 25 commits intoAda-C9:masterfrom
cmn53:master
Open

Caroline Nardi - Hotel - Octos#29
cmn53 wants to merge 25 commits intoAda-C9:masterfrom
cmn53:master

Conversation

@cmn53
Copy link

@cmn53 cmn53 commented Mar 12, 2018

Hotel

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a design decision you had to make when working on this project. What options were you considering? What helped you make your final decision? In my initial design, each instance of Room had an array of reservations, and an instance method determined whether or not the room was available for a given date. When I implemented the date range class, however, it seemed like every class was used to determine whether there was a conflict with a new reservation, which raised an alarm of there being too many dependencies. I refactored the Admin#find_available_rooms method to iterate through the reservations to find free rooms instead of relying on the instance of the rooms themselves. In the end, this meant that the rooms class didn't do much of anything, but I preferred that each reservation have an instance of room rather than just an integer, in case the room numbers were to change in the future.
Describe a concept that you gained more clarity on as you worked on this assignment. This is more of a tool than a concept, but I had not done any set operations in Ruby before this project. I think I also gained a little more clarity about sending objects as messages, rather than instance method returns. Initially I was sending the result of DateRange#range to methods in Reservations and Admin, but the implementation of the overlap? methods in DateRange and Reservation eliminated the need to send the actual range and allowed me to just send the DateRange object.
Describe a nominal test that you wrote for this assignment. An example of a nominal test was checking that the Reservation#change_status would change the block_status of a block reservation from :blocked to :reserved, and vice versa.
Describe an edge case test that you wrote for this assignment. An example of an edge case test was testing that the Reservation#change_status method would not alter the block_status of a non-block reservation.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? I'll admit that I didn't really do a lot of pseudocode writing. But I did get better at writing some tests before the code... I think the simplecov requirement helped to enforce the need for incremental test writing.

cmn53 added 24 commits March 5, 2018 12:32
@kariabancroft
Copy link

Hotel

What We're Looking For

Feature Feedback
Design
Demonstrated classes having a single responsibility Yes. I like the way you implemented a class for the date logic. I'd consider how you could pull the block room logic out of the main reservation to solidify this single responsibility even more.
Demonstrated loose coupling Yes. Your Admin class has a lot of logic, but I think it still utilizes each individual class well.
Methods demonstrate a good use of encapsulation, inputs and outputs Yes
Wave 1 requirements Yes
Wave 2 requirements Yes
Wave 3 requirements Yes

Your code looks great, it is nice and clean and easy to read.

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