Skip to content

Conversation

@KKennedyCodes
Copy link

Hotel

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What was a design challenge that you encountered on this project? I really struggled with where to put the rooms. I ended up making a class for the rooms, but still had trouble utilizing it.
What was a design decision you made that changed over time over the project? My dates class was continually evolving to hold more over the time of the project. If I had more time, I may have also ended up deleting the rooms class or using it differently.
What was a concept you gained clarity on, or a learning that you'd like to share? After this project, I learned about to better access information from other classes. During the design process, I really tried to be careful with how coupled my classes were. The reading helped to bring this design value into focus.
What is an example of a nominal test that you wrote for this assignment? What makes it a nominal case? One nominal test I had was for making a reservation with no conflicts. Another nominal test was for an acceptable date range.
What is an example of an edge case test that you wrote for this assignment? What makes it an edge case? An edge case that I tested was for a new reservation that ended on a start day of another reservation. Another edge case I tested was for invalid date ranges.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? Writing pseudocode helped me to get my ideas down before getting caught up in the syntax. It helped to develop a scope or outline of work to be done.

@beccaelenzil
Copy link

beccaelenzil commented Sep 11, 2019

Hotel

What We're Looking For

Test Inspection

Workflow yes / yes but no test / no
Wave 1
List rooms yes
Reserve a room for a given date range yes
Reserve a room (edge case) no - I see you test for invalid date range in your date_test.rb. I see that create_reservation instantiates a new instance of Reservation which itself instantiates a Date_Reservation. This is where you do your valid input checking, which is great, and everything looks like it's hooked up correctly. However, you also need to test for valid date ranges at the time you create a reservation. It seems that you have written a method for that, reservation_validation, but you never invoke this method.
List reservations for a given date yes, but your tests for find_booked should include edge cases.
Calculate reservation price yes
Invalid date range produces an error yes, but again, test for this when you create a new reservation.
Test coverage yes
Wave 2
View available rooms for a given date range should include edge cases
Reserving a room that is not available produces an error It seems like this functionality was built into overlap_check in the Reservation_Date class, and then invoked in reservation_validation in the System class, but reservation_validation is never invoked. Also, as I mentioned above, you should write tests for create_reservation that check different date combinations.
Test coverage system.rb is covered at 77%
Wave 3
Create a block of rooms N/A
Check if a block has rooms N/A
Reserve a room from a block N/A
Test coverage N/A

Code Review

Baseline Feedback
Used git regularly yes
Answer comprehension questions yes
Design
Each class is responsible for a single piece of the program yes
Classes are loosely coupled yes
Fundamentals
Names variables, classes and modules appropriately yes -- date_test.rb should be called reservation_date_test.rb
Understanding of variable scope - local vs instance yes
Can create complex logical structures utilizing variables yes
Appropriately uses methods to break down tasks into smaller simpler tasks yes
Understands the differences between class and instance methods yes
Appropriately uses iterators and Enumerable methods yes
Appropriately writes and utilizes classes yes
Appropriately utilizes modules as a namespace yes
Wrap Up
There is a refactors.txt file The last step was to reflect on changes you would make in the future as we will have an opportunity to refactor this project.
The file provides a roadmap to future changes N/A

Overall Feedback

You're off to a good start! You've built your first project with minimal starting code. This represents an incredible milestone in your journey, and you should be proud of yourself!

I am particularly impressed by the way that you broke down complicated logic into helper methods. This is particularly evident in the methods you wrote for the Reservation_Date class.

I do see some room for improvement around putting all the pieces together so that they all work together. You wrote solid methods for checking for valid reservations, but these were never invoked. When we refactor in a couple weeks, I am excited to see how you can bring all the pieces together to meet all the requirements of Waves 1 and 2.

return @reservations
end

# def self.find(date_range_object)

Choose a reason for hiding this comment

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

Remove commented code before turning in.

RATE = 200.0

def initialize room_num = nil
unless room_num.to_i > 0

Choose a reason for hiding this comment

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

This is a good use of an ArgumentError

end

def create_reservation(room_num: nil, start_date: start_date, end_date: end_date, rate: nil)
#reservation_validation(start_date, end_date)

Choose a reason for hiding this comment

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

This looks like a useful method. Why don't you use it?

@reservations << new_reservation
end

def reservation_validation(start_date, end_date)

Choose a reason for hiding this comment

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

This looks like a useful method, and makes good use of the overlap_check method from Reservation_Date. You are on the right track.

end
end

# def reservation_check_all

Choose a reason for hiding this comment

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

Removed unused code.


it "Checks for a Valid Date" do
expect {
Hotel::Reservation_Date.new("2019-02-30", "2001-02-03")

Choose a reason for hiding this comment

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

Consider storing these dates in variables to separate our Arranging, Acting, and Asserting

@@ -0,0 +1,93 @@
require_relative 'test_helper'

describe "Date" do

Choose a reason for hiding this comment

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

Since this file is a suite of tests for Reservation_Date give it the title reservation_date_test

}.must_raise ArgumentError
end

it "Calculates Date Range (Num of Nights)" do

Choose a reason for hiding this comment

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

Great set of tests! You also need this when you're creating a reservation.

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