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

Amper: Kaitlin Forsman #23

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

Amper: Kaitlin Forsman #23

wants to merge 35 commits into from

Conversation

kcforsman
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 chose to keep the room class separate, because I found it made the most sense for me to track the booking and availability. I could have found some way to store the information in the reservations or within my User class, and made rooms just a string. I feel that room as a class leaves more opportunity for ease of change in the future.
Describe a concept that you gained more clarity on as you worked on this assignment. I don't think I implemented it well and truthfully I'm still working on refactoring everything. I feel like while working on this project, I was thinking a lot about dependencies and how to work with them and how to pull them out of code (some). I still need to apply it across the code but I do feel like the project has helped a lot with that concept.
Describe a nominal test that you wrote for this assignment. reserve_room in User class needs to return a instance of a Reservation, so the test confirms the return is what's expected
Describe an edge case test that you wrote for this assignment. I wrote what I think is an edge-case for create a Block, so that it can't have less than 2 rooms. If a party were only renting 1 room it wouldn't make sense to be able to make a block rather than a normal single reservation.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? I feel that I am very comfortable with writing the tests and then writing the code, but I am struggling a little with what is function pseudocode. I think my version of pseudocode was creating flow charts and outlines for what different classes I wanted and what I felt they should do.

… start_date and end_date, and raises an exception for trying to reserve a room that has preexisting reservation in date range
… list of available rooms for a given date_range
…_date and it allows user to make new reservation on a room starting same day as another reservations end_date
…ilable rooms in a block -- finished first attempt at all basic requirements for this assignment
…nitialize to use dependency injection instead and trying to separate other dependencies
lib/block.rb Outdated
class Block < Reservation
attr_reader :id, :reservations
def initialize(id, rooms, party, date_range, discount)
@id = id

Choose a reason for hiding this comment

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

You should be using super here. Nice work using inheritance however!

@CheezItMan
Copy link

CheezItMan commented Mar 19, 2018

Hotel

What We're Looking For

Feature Feedback
Design
Demonstrated classes having a single responsibility Check, Overall nice work here.
Demonstrated loose coupling Check
Methods demonstrate a good use of encapsulation, inputs and outputs Check
Wave 1 requirements Check, nicely done
Wave 2 requirements Check, well done, I like how you used a hash of dates for reservations, very time, efficient.
Wave 3 requirements Check, nice work using inheritance with Block.
Summary Nicely done, you hit all the learning goals for the project. Good use of inheritance and hashes for finding bookings. Check out our reference implementation

end
@rooms = rooms
@reservations = []
@calendar = {}

Choose a reason for hiding this comment

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

Interesting idea having a hash of the reservation dates, very efficient.

…le, so the id isn't dependent on the length of the array, which might lead to duplicate ids
… date_range (more like adjusted the tests because that seemed to be the main use of the date_range)
…where in the code by other classes, so didn't need to change anything else
… interact with the room's instance variable for cost
…s design and what I tried to do to implement it
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