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

Lauren Cardella -- Carets #28

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

Conversation

enigmagnetic
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 made a Hotel class (which would probably be more aptly named Scheduler or FrontDesk) to manage reservations, instead of using a class variable or ObjectSpace method to keep track of Reservation and Block instances. I wanted to avoid class variables and the ObjectSpace method was causing unpredictable object counts in the tests. Instead, the reservations and blocks are stored as arrays in a Hotel instance as an instance variable.
Describe a concept that you gained more clarity on as you worked on this assignment. I learned a lot more about how to use the Date class, though I feel my conversions were messy. I am still unclear on how to selectively read and write to CSV files--I tried to accomplish the optional and make my reservations and block lists into CSVs but I was not able to complete it.
Describe a nominal test that you wrote for this assignment. In the hotel_spec, I wrote a test to make sure that initializing the Hotel instance produces the proper object type and that the object responds to its reader attributes.
Describe an edge case test that you wrote for this assignment. I wrote a set of assertions to check whether invalid date inputs raise proper ArgumentError.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? I did not strictly follow writing in pseudocose first. I started by writing user stories, then sketched out the classes and their responsibilities, then wrote the tests. I only used pseudocode for some trickier bits of logic.

@CheezItMan
Copy link

Hotel

What We're Looking For

Feature Feedback
Baseline
Used git regularly Not very many commits, good commit messages.
Answer comprehension questions Check
Design
Each class is responsible for a single piece of the program Well done here.
Classes are loosely coupled Well done here, good use of methods to separate functionality.
Wave 1
List rooms Check
Reserve a room for a given date range Check
List reservations for a given date Check, well done good use of enumerables
Calculate reservation price Check
Invalid date range produces an error Check, good use of a helper method although I would have made that method private.
Wave 2
View available rooms for a given date range Check
Reserving a room that is not available produces an error Check
Wave 3
Create a block of rooms Check
Check if a block has rooms Check, nicely written.
Reserve a room from a block Check
Test coverage 99%
Additional Feedback Very nicely written, really great use of enumerables. Good use of inheritance with Block. Nice work, you hit all the requirements and used a CSV for the rooms, although that's just a file of numbers. This was great work on a 1st design project.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Nicely done, just one comment.

attr_reader :name, :checkin, :checkout, :room

def initialize(args)
if valid_dates?(Date.strptime(args[:checkin], '%m-%d-%Y'), Date.strptime(args[:checkout], '%m-%d-%Y'))

Choose a reason for hiding this comment

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

Why no else to generate an error if the checkin and checkout are missing.

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