Skip to content

&&: Kate Pond#20

Open
Oh-KPond wants to merge 51 commits intoAda-C9:masterfrom
Oh-KPond:master
Open

&&: Kate Pond#20
Oh-KPond wants to merge 51 commits intoAda-C9:masterfrom
Oh-KPond:master

Conversation

@Oh-KPond
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? When first deciding on the design it seemed to make sense to have the classes HotelAdmin, Reservation, Room, and Block Rooms since a HotelBooking system Has-A for each of those classes, however upon the realization that Room was only holding a constant for price and a number acting as a room id, I decided to integrate it into the HotelAdmin Class as a constant and an array of room numbers to avoid having unnecessary code in a separate class.
Describe a concept that you gained more clarity on as you worked on this assignment. I feel like I understand the benefit of loosely coupled classes better. It seems like I spent a lot of time doing complicated refactoring when there were a lot of dependencies. However, I still feel like I don't completely understand composition or how to DRY my code better.
Describe a nominal test that you wrote for this assignment. In the method make_reservation my nominal case checks that the method creates an instance of HotelBooking::Reservation.
Describe an edge case test that you wrote for this assignment. Also in the make_reservation, I created a test that throws an error if the room is not valid room in the hotel.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? I find that writing pseudocode really helps me talk out and remember the logic for some of the more complicated methods. I found myself mostly thinking about what I wanted the code to do, writing the test, then writing the pseudocode and then writing the code. I think that this is fine since I'd like to think of the tests as a black box where the code could be anything.

Oh-KPond added 30 commits March 5, 2018 13:20
…refactors make_reservation so that it adds a room instance to the reservation
Oh-KPond added 20 commits March 9, 2018 00:36
…ion that insures date does not need to be converted to Date if it is already a date input
@CheezItMan
Copy link

Hotel

What We're Looking For

Feature Feedback
Design
Demonstrated classes having a single responsibility Check, well done
Demonstrated loose coupling Check nice!
Methods demonstrate a good use of encapsulation, inputs and outputs Check!
Wave 1 requirements Check!
Wave 2 requirements Nicely done!
Wave 3 requirements Incomplete
Summary I know you had issues and couldn't complete Wave 3, but you did great on waves 1-2. Check out our reference implementation. Overall nice work.

rooms_availible = @admin.find_availiblity('2018-10-3', 4)

rooms_availible.must_be_kind_of Array
rooms_availible[0].must_equal 5

Choose a reason for hiding this comment

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

This test is failing.

reservations = find_reservations(first_night)
booked_rooms = reservations.map { |reservation| reservation.room }
availible_rooms = @all_rooms - booked_rooms

Choose a reason for hiding this comment

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

Nice work

dates << date
end

return dates

Choose a reason for hiding this comment

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

👍

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