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

Luxi Lindsey - hotel - Octos #22

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

Conversation

Lindseyls
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? I had a very difficult time starting this project and got stuck on the design portion for a couple of days. I tried to build my hotel classes around what we did for the ride share project including an Admin, Customer, Room, and Reservation class. In the end, I decided to remove the Customer class to reduce clutter. Also, I started my Room class creating all 20 rooms within this class. Then, with Dan's help I decided to iterate and create all 20 rooms in the Admin class because only the Admin require to know all 20 rooms and its information, not the Room class itself.
Describe a concept that you gained more clarity on as you worked on this assignment. I gained more clarity on composition or the has-a relationship between each class. I also think that I understand how to write minitests a little better this time. I did my best to write the tests first and then the code. I think it helped with getting more coverage. Having SimpleCov also helped a lot figuring out where I needed to write more code.
Describe a nominal test that you wrote for this assignment. For the Admin#add_reservation method, by giving the two check_in and check_out dates as arguments I knew I should see the method return the new reservation information including the room number, rate and total_cost. Also, the dates are now included along with the room information so that if the admin wants to see the reservation all they have to do is list one date in the Admin#list_reservation method.
Describe an edge case test that you wrote for this assignment. Almost for all the methods, I checked both the dates and date range. First, I checked the individual dates to see if the check_in and check_out date inputs are invalid. Then, I check to see if the date range is correct by checking if the check_out date is after the check_in date.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? Due to the difficulties that I had starting this project. I did not get to do the pseudocode portion very well. I hope to keep practicing and improve the design and pseudocode techniques. However, while going through Wave 1 and Wave 2, I did my best to first write the tests and then the code. Most of the time I did have to go back and forward a little bit.

Lindseyls added 19 commits March 5, 2018 12:28
…nd cost for one room. The test passed successfully.
…d the new request to help skip tests. Also, udpated the room.rb and spec file to take in a room rate so that it can be changed if needed to be later.
…dd a new reservation with a check_in and check_out date.
…le by adding a before method to create an instance variable @room.
…k if the date is valid and one to calculate the total cost.
… the spec file for Reservation class. Refractured some of the testing and private helper methods.
…Error when the check_in or check_out date is invalid was not fully covered. Updated the Reservation sepc file and now the coverage is at 100%.
@Lindseyls
Copy link
Author

Please note, I was not able to start Wave 3. I hope to keep working on the Hotel project and have Wave 3 completed some time this week. Please let me know if you have any questions. Thank you!

@kariabancroft
Copy link

Hotel

What We're Looking For

Feature Feedback
Design
Demonstrated classes having a single responsibility Yes - Nice use of private methods for logic that didn't need to be exposed outside. I think you could pull out the date validation logic level further so you wouldn't need to duplicate the date_range_check.
Demonstrated loose coupling Yes
Methods demonstrate a good use of encapsulation, inputs and outputs Yes
Wave 1 requirements Yes
Wave 2 requirements Yes
Wave 3 requirements No

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