Skip to content

Leaves -- Janice#23

Open
jaitch wants to merge 65 commits into
Ada-C12:masterfrom
jaitch:master
Open

Leaves -- Janice#23
jaitch wants to merge 65 commits into
Ada-C12:masterfrom
jaitch:master

Conversation

@jaitch

@jaitch jaitch commented Sep 9, 2019

Copy link
Copy Markdown

Hotel

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What was a design challenge that you encountered on this project? I kept changing my thoughts on what justified a separate class. I didn't quite realize all that was involved with blocks--I wish I had stuck to my original plan of making it a child of Reservation, but I had turned what started out as Reservation into Hotel...Block isn't a Hotel, so I didn't. Now I want to add both Reservation and Block!
What was a design decision you made that changed over time over the project? Reservation became Hotel, Calendar became DateRange, I handled blocks as methods within Hotel rather than making it a separate class (which, as explained above, I regret). I also decided to return "Sorry" statements rather than raising exceptions except in the case of invalid dates. I thought exceptions were too extreme to the kinds of simple mistakes I was catching in those situations.
What was a concept you gained clarity on, or a learning that you'd like to share? I got to experience that writing lots of tests before writing code forces me to think about the code differently. I worry that at times I was too excited to get to the code that I didn't write enough tests.
What is an example of a nominal test that you wrote for this assignment? What makes it a nominal case? Making a block then reserving one of the rooms within the block. It's a nominal case because it's what is supposed to happen.
What is an example of an edge case test that you wrote for this assignment? What makes it an edge case? Making a block, reserving one of the rooms, then trying to reserve the same room. It's an edge case because it's not what the program intends to happen but could.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? I did write some pseudocode, but probably not as much as I should have. I did pretty well at sticking to writing tests before code. That did part of the job of writing pseudocode--planning what functionality the methods would have.

…sing. add duration method dates that straddle month
…reate method for finding available room, call within make reservation. all green
…nction rather than in helper methods, start writing more tests
@beccaelenzil

Copy link
Copy Markdown

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) yes
List reservations for a given date yes
Calculate reservation price
Invalid date range produces an error yes
Test coverage yes
Wave 2
View available rooms for a given date range yes
Reserving a room that is not available produces an error this sends an error message, you should raise an exception
Test coverage great tests that looks at positive and negative nominal and edge cases
Wave 3
Create a block of rooms yes
Check if a block has rooms yes
Reserve a room from a block yes
Test coverage yes

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 -- but a reservation class would lessen the heavy lifting done by hotel
Classes are loosely coupled yes
Fundamentals
Names variables, classes and modules appropriately class and module named hotel
Understanding of variable scope - local vs instance it seems that some local variables are made instance variables unneccessarily.
Can create complex logical structures utilizing variables yes
Appropriately uses methods to break down tasks into smaller simpler tasks yes -- there are some opportunities to DRY out your code
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 yes
The file provides a roadmap to future changes yes

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 wrote tests to test for both positive and negative nominal and edge cases.

I do see some room for improvement around writing flexible methods so that you do not repeat your code. In addition, you could make even more use of classes and objects to simplify the way that data is being stored and passed around.

…s behavior of room and data was being changed by front_desk
… method in room class, as list available room by date is doing. had to simplify--now returning array of room numbers, not hashes of room numbers and date ranges. I think some tests failing bc no longer using available_rooms instance variable.
…ange method to room class and adapt make reservation and make block methods in front desk accordingly
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.

3 participants