Skip to content

Ports - Ngoc#34

Open
lebaongoc wants to merge 19 commits intoAda-C11:masterfrom
lebaongoc:master
Open

Ports - Ngoc#34
lebaongoc wants to merge 19 commits intoAda-C11:masterfrom
lebaongoc:master

Conversation

@lebaongoc
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? It was challenging for me to decide how many classes there are and their relationships
What was a design decision you made that changed over time over the project? At first I have a Room class but later on found no use for it so I delete it. I did not have a Hotel Block class until wave 3
What was a concept you gained clarity on, or a learning that you'd like to share? I gained much more clarity on how important design is and how my choice on the data structure that store the reservation and the room affect the changes that I made to the program later on
What is an example of a nominal test that you wrote for this assignment? What makes it a nominal case? Under the reservation tracker# add_reservation method test, I added 3 reservation and expected the total number of reservations store in the program to be 3. This is a nominal case since the program is working as it is intended to
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 is there I tested a start_date for a reservation that is after and end-date which prompt an Argument Error. This is and edge-case because these inputs are different from what expected/normal date range should be.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? It really helps to write pseudocode first as it provides me with clarity when I write complicate if statement :)

@CheezItMan
Copy link
Copy Markdown

Hotel

What We're Looking For

Feature Feedback
Baseline
Used git regularly Reasonable number of commits and good commit messages
Answer comprehension questions Check, Glad pseudocode helped
Design
Each class is responsible for a single piece of the program Your Tracker class is doing too much of the work. See my inline notes.
Classes are loosely coupled Yes, although the tracker class is doing the vast bulk of the work.
Wave 1
List rooms Check
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
Create a block of rooms Check
Check if a block has rooms Check
Reserve a room from a block Check
Test coverage 100%
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, but you should make the helper methods private!
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 Check, but more detail would be appreciated
Additional Feedback You hit the learning goals of the project and it works, awesome. That said your tracker class is doing waaaay too much of the business logic. Instead outsource some of it to reservation, block or Room, or create a DateRange class. You also have some duplicate data with an array of reservations and each room has a list of reservations. Take a look at my comments and let me know if you have questions.

Comment thread spec/hotel_block_spec.rb Outdated
Comment thread lib/reservation_tracker.rb Outdated
Comment thread lib/reservation_tracker.rb Outdated
Comment thread lib/reservation_tracker.rb Outdated
Comment thread lib/reservation_tracker.rb Outdated
Comment thread lib/reservation_tracker.rb Outdated
Comment thread lib/reservation_tracker.rb Outdated
Comment thread lib/reservation_tracker.rb Outdated
Comment thread spec/reservation_tracker_spec.rb
Comment thread spec/reservation_tracker_spec.rb
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