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

Branches, Kristy #47

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

Branches, Kristy #47

wants to merge 17 commits into from

Conversation

kristyh32
Copy link

Hotel

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What was a design challenge that you encountered on this project? It was a challenge to decide how to format the hotel blocks, whether they should be the same as a reservation or different
What was a design decision you made that changed over time over the project? I originally decided that reservations and blocks should be two separate things, it eventually made more sense to me to have them both inherit from an abstract class.
What was a concept you gained clarity on, or a learning that you'd like to share? I learned how important it is to spend the time to really think about your design. Because I did that, I didn't have to make many changes to my overall design.
What is an example of a nominal test that you wrote for this assignment? What makes it a nominal case? An example of a nominal test that I wrote was that creating a new reservation would add it to the list of reservations. This is nominal because it is expected behavior that will happen often in the program
What is an example of an edge case test that you wrote for this assignment? What makes it an edge case? an edge case test example was that entering a start date that came after the end date must raise an error. It is an edge case because it is unlikely that anyone would try to make a reservation with the start date after the end date.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? I felt like pseudocoding really helped me understand what it was that I was trying to accomplish, which then helped me write better tests and have a clearer understanding of how to write code to pass them.


end

def print_rooms

Choose a reason for hiding this comment

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

I'd avoid using print in the names of methods that return strings, since people might think it outputs the string to the terminal instead.


end

def avail_from_block(block_id)

Choose a reason for hiding this comment

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

I might move this sort of functionality into Block.

attr_reader :number
attr_accessor :cost

def initialize(number, cost = 200)

Choose a reason for hiding this comment

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

Good use of a default value!

avail_rooms = @rooms.select { |room| taken_rooms.include?(room) == false }

if avail_rooms.length == 0
raise ArgumentError.new("There are no hotel rooms avaialbe for that time frame")

Choose a reason for hiding this comment

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

This should probably be a StandardError or a custom error since it's raised because of the state of your program, not the arguments themselves.

(Most of our examples use ArgumentError so this was a pretty common mistake and we'll clarify the point for next cohort.)

@kaidamasaki
Copy link

kaidamasaki commented Sep 15, 2019

Hotel

What We're Looking For

Test Inspection

Workflow yes / yes but no test / no
Wave 1
List rooms 👍🏻 (Though you returned the rooms as a string instead of an array.)
Reserve a room for a given date range 👍🏻
Reserve a room (edge case) 👍🏻
List reservations for a given date 👍🏻
Calculate reservation price 👍🏻
Invalid date range produces an error 👍🏻
Wave 2
View available rooms for a given date range 👍🏻
Reserving a room that is not available produces an error 👍🏻
Wave 3
Create a block of rooms 👍🏻
Check if a block has rooms 👍🏻
Reserve a room from a block 👍🏻

Code Review

Baseline Feedback
Used git regularly 👍🏻
Answer comprehension questions 👍🏻
Test coverage 👍🏻
Design
Each class is responsible for a single piece of the program 👍🏻 (Though I feel like HotelBooker took on a little too much responsibility.)
Classes are loosely coupled 👍🏻
Fundamentals
Names variables, classes and modules appropriately 👍🏻
Understanding of variable scope - local vs instance 👍🏻
Can create complex logical structures utilizing variables 👍🏻
Appropriately uses methods to break down tasks into smaller simpler tasks 👍🏻
Appropriately uses iterators and Enumerable methods 👍🏻
Appropriately writes and utilizes classes 👍🏻
Appropriately utilizes modules as a namespace 👍🏻
Wrap Up
There is a refactors.txt file 👎🏻
The file provides a roadmap to future changes 👎🏻

Overall Feedback

Great work overall! 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 handled blocks. Those are really hard to get right and are definitely the trickiest part of this assignment.

There were a few little things wrong with your submission but nothing big aside from the missing refactors.txt.

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