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

Angelica Ceja - Hotel - Octos #27

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

Conversation

amcejamorales
Copy link

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? One design decision I made was to allow the administrator or user to select the room number when reserving an available room for the public or in a block. At first I simply selected the first available from either of these, but I decided against that because in the real world clients may want to choose a room number for whatever reason. When I updated my program based on this design decision I also made sure the administrator could not reserve a room that had already been reserved for the given date range.
Describe a concept that you gained more clarity on as you worked on this assignment. I gained a lot more clarity on what Metz described as dependencies. For example, I completed the project through Wave 3 using a hash for my @rooms_and_reservations instance variable. The keys in the hash were the room numbers (1 through 20), and the values were arrays of reservations corresponding to each room number. However, when I got to the optional requirement to allow the administrator to set different rates for different rooms I had to do a huge refactoring. I changed my @rooms_and_reservations instance variable to instead be an array of hashes. Each hash contains room number, rate, and reservations. Because of this significant change in data structure I had to refactor anything in my program that depended on my instance variable and the ripple was pretty significant.
Describe a nominal test that you wrote for this assignment. For my #reserve_available method I wrote this test: it "creates a reservation for the selected room if it's available". This test describes the main objective of the method. I set a variable equal to the known next available room number and then call my method, #reserve_available, using said room_number variable. Finally I verify that the reservation I created was indeed for the expected room number.
Describe an edge case test that you wrote for this assignment. For my #reserve_available method I wrote this test: it "raises an error if you try to reserve a room that has already been reserved for the date range provided". In the CLI I wrote the administrator would only be able to see rooms which haven't been reserved yet, so if they chose to try to reserve a room they didn't see listed they would get an error.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? I only did this occasionally. More often than not I jumped into the tests first, then pseudocode, then the code.

@kariabancroft
Copy link

Hotel

What We're Looking For

Feature Feedback
Design
Demonstrated classes having a single responsibility Nice job abstracting out your date logic to go within the module. I think that it makes sense that the ReservationManager is the largest class with the most functionality, but I think a lot of the individual classes like Guest should have more responsibility.
Demonstrated loose coupling Related to the comment above, I think that the individual classes are generally loosely coupled until you get to the ReservationManager which relies on the very specific details of each individual class.
Methods demonstrate a good use of encapsulation, inputs and outputs Yes
Wave 1 requirements Yes
Wave 2 requirements Yes
Wave 3 requirements Yes

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