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

Ports - Kasey #36

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

Ports - Kasey #36

wants to merge 8 commits into from

Conversation

kaseea
Copy link

@kaseea kaseea commented Mar 18, 2019

Hotel

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What was a design challenge that you encountered on this project? deciding what can be fed into the program. For example, to create a reservation you have to put in a date object (Date.new(2002, 2, 2) instead of just (2002, 2, 2). I liked it more because it felt cleaner and more powerful, but felt guilty designing it to put the burden on someone else to supply a Date class.
What was a design decision you made that changed over time over the project? Although wave 3 was not complete, the structure/design of my reservation got changed in design ways I'm not happy with.
What was a concept you gained clarity on, or a learning that you'd like to share? I still need a lot more experience with this, but the concept I gained more clarity on is the importantce/annoyance of scope. Most design ideas I natural have fail (see blocks) when it comes to the idea of getting information to another class.
What is an example of a nominal test that you wrote for this assignment? What makes it a nominal case? checking in and out of a given day with no conflicts
What is an example of an edge case test that you wrote for this assignment? What makes it an edge case? checking in and out of a window between two bookings
How do you feel you did in writing pseudocode first, then writing the tests and then the code? my pseudocode was more of a list of the functionality requirements then most of the code needed to get it to work for wave 1 and 2. It worked well there, but sort of felt like magic.

@CheezItMan
Copy link

Hotel

What We're Looking For

Feature Feedback
Baseline
Used git regularly Relatively few commits, Avoid using wave numbers for commit messages, instead just describe what your code does. If you can't it's because you wait too long before committing.
Answer comprehension questions Check,
Design
Each class is responsible for a single piece of the program Check, see my comments about detecting reservation overlap in the reservation class.
Classes are loosely coupled Check
Wave 1
List rooms
Reserve a room for a given date range Check
List reservations for a given date Check
Calculate reservation price Check
Invalid date range produces an error Check
Wave 2
View available rooms for a given date range Check
Reserving a room that is not available produces an error Check
Wave 3 INCOMPLETE
Create a block of rooms
Check if a block has rooms
Reserve a room from a block
Test coverage 98%
Fundamentals
Names variables, classes and modules appropriately Check
Understanding of variable scope - local vs instance Check
Can create complex logical structures utilizing variables Check
Appropriately uses methods to break down tasks into smaller simpler tasks Check
Understands the differences between class and instance methods Check
Appropriately uses iterators and Enumerable methods Check
Appropriately writes and utilizes classes Check
Appropriately utilizes modules as a namespace MISSING
Wrap Up
There is a refactors.txt file Check
The file provides a roadmap to future changes More detail needed here
Additional Feedback Not bad, you hit most of the learning goals for the project and clearly didn't have time to get to Wave 3. Check out my comments and let me know where you have questions. Nice work with the testing!


Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new

# Require_relative your lib files here!
require_relative "../lib/Reservation"
require_relative "../lib/Hotel"
require_relative "../lib/Rooms"

Choose a reason for hiding this comment

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

the Rooms file doesn't exist`.

Also typically in Ruby we don't capitalize file names. Just a style thingy.

booked_rooms = []
dates.each do |date|
reservation_by_date(date).each do |res|
booked_rooms << res.room

Choose a reason for hiding this comment

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

This works, but you'll end up with a lot of duplicate rooms in booked_rooms, just a little inefficient.

end
end

def create_hotel_block(check_in:, check_out:, block_size:, block_name:, block_discount: nil)

Choose a reason for hiding this comment

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

Looks like you got started with blocks

@block_room_status = block_room_status
@discount = discount
end

Choose a reason for hiding this comment

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

Suggestion: detecting if a reservation overlaps with a date sounds like something that reservation should be able to answer, instead of your Hotel class.

@@ -0,0 +1 @@
I'd like to get wave 3 working. Especially clean up reservations and play with an idea I have about having a reservations class, and also a block class.

Choose a reason for hiding this comment

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

You've started on this, but more detail is needed.

end.must_raise ArgumentError
end

it "lets you book a reservation on the same day as a checkout" do

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