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

Hotel Cara Octo #40

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

Conversation

MississippiBrenn
Copy link

@MississippiBrenn MississippiBrenn commented Mar 12, 2018

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 tried to decide how I wanted to create the room array, and how I wanted to save reservations. I decided to have the rooms own the reservations, as it seemed the simplest data structure and I needed to build the fewest things to complete it.
Describe a concept that you gained more clarity on as you worked on this assignment. I gained clarity around how objects are tied to each other, and how they all update at once, unless you somehow untie them. Also I gained some clarity around arrays and finding objects within them. Also got much better at using awesome print for debugging.
Describe a nominal test that you wrote for this assignment. A nominal test I wrote was that the hotel can create rooms.
Describe an edge case test that you wrote for this assignment. An edge case was trying to reserve more rooms than were in the hotel.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? I felt good about this process in Wave 1, by Wave 2 it had started to break down. There were some points of confusion as to how to go about this when things started breaking. Did I start the whole process over from Wave 1 and write all new tests and psuedocode? How did I work this into what was going on without overwriting things and keeping track of everything? I didn't find any great answers for changes in process.

until i == @rooms.length || reservation_made == reservation.number_of_rooms

if @rooms[i] == nil
@rooms[i] = []

Choose a reason for hiding this comment

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

You could clean this up by creating one initial local variable equal to @rooms[i] so you don't have to duplicate this everywhere

Copy link
Author

Choose a reason for hiding this comment

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

So I would define @rooms[i] = [] as the default value in the initializer?

Choose a reason for hiding this comment

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

No, something like this_room = @rooms[i] and then use this_room wherever you were previously using @rooms[i]

class Hotel
attr_reader :rooms

def initialize(rooms)

Choose a reason for hiding this comment

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

Consider renaming this variable to room_count or something since right now it isn't clear what this variable would contain

@kariabancroft
Copy link

Hotel

What We're Looking For

Feature Feedback
Design
Demonstrated classes having a single responsibility Mostly! Nice job using inheritance for your Block.
Demonstrated loose coupling Somewhat - the Hotel class still relies on knowing a lot of information about the details of the reservation and blocks.
Methods demonstrate a good use of encapsulation, inputs and outputs Mostly - there are some methods that serve their purpose and use their inputs, but do not output any meaningful result where i think they could (T/F for some of the reservation methods, for ex)
Wave 1 requirements Yes
Wave 2 requirements Yes
Wave 3 requirements Yes

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