Skip to content

Christina Hotel#46

Open
Peacegypsy wants to merge 14 commits intoAda-C10:masterfrom
Peacegypsy:master
Open

Christina Hotel#46
Peacegypsy wants to merge 14 commits intoAda-C10:masterfrom
Peacegypsy:master

Conversation

@Peacegypsy
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? What classes and how many to use, where to create objects and where to store them. I changed things around completing Wave One and ended up going in to the weeds and needing to scrap and go backwards.
Describe a concept that you gained more clarity on as you worked on this assignment. Classes, methods, initializing, TDD , and pry.
Describe a nominal test that you wrote for this assignment. room status being other than available or unavailable.
Describe an edge case test that you wrote for this assignment. I didn't get as far as edge cases, but hopefully will, while i keep plugging away at it.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? it helps clarify what I wanted to write after creating the test.

@CheezItMan
Copy link

Hotel

What We're Looking For

Feature Feedback
Baseline
Used git regularly Good number of commits and very descriptive commit messages
Answer comprehension questions Check
Design
Each class is responsible for a single piece of the program You have some of the areas of the design set up, but no way to currently book reservations through the hotel admin.
Classes are loosely coupled Check
Wave 1
List rooms Check
Reserve a room for a given date range The class exists, but code not written yet.
List reservations for a given date INCOMPLETE
Calculate reservation price Check
Invalid date range produces an error INCOMPLETE
Test coverage 84.44%
Wave 2
View available rooms for a given date range INCOMPLETE
Reserving a room that is not available produces an error INCOMPLETE
Wave 3 INCOMPLETE
Create a block of rooms
Check if a block has rooms
Reserve a room from a block
Fundamentals
Names variables, classes and modules appropriately Some names could be better. You also have multiple modules, which doesn't make sense.
Understanding of variable scope - local vs instance You are using class variables inappropriately in some areas.
Can create complex logical structures utilizing variables Not working
Appropriately uses methods to break down tasks into smaller simpler tasks Several methods not working
Understands the differences between class and instance methods Check
Appropriately uses iterators and enumerables INCOMPLETE
Appropriately writes and utilizes classes INCOMPLETE
Appropriately utilizes modules as a mechanism to encapsulate functionality INCOMPLETE
Wrap Up
There is a refactors.txt file MISSING
The file provides a roadmap to future changes MISSING
Additional Feedback See my inline notes, you have some pieces in place for a good design, but it looks like, as you said, that you got lost in the weeds in this project. I would suggest taking time to talk with someone to go through the design and sketch things out. For the break week, I'd suggest seeing if you could build a DateRange class with methods to determine if a date is inside the range.

attr_accessor :room_status, :start_date, :end_date

def res_start(start_time = '11:00'.strftime('%k%M'))
@res_start = res_start

Choose a reason for hiding this comment

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

I'm not sure what purpose this method is serving, it seems to do recursion.


def initialize(room_number, start_date_time, end_date_time)
@room_number = room_number
@start_date = start_date

Choose a reason for hiding this comment

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

Here you are setting @start_date to itself. It should probably be @start_date = start_date_time

@@ -0,0 +1,24 @@
class DateRange

Choose a reason for hiding this comment

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

The idea for this class is a really good idea, but the implementation doesn't make sense.

end

def self.check_room_status
@booked_rooms = []

Choose a reason for hiding this comment

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

Since this is a class method, you shouldn't need instance variables.

@open_rooms = []
@rooms.each do |number, status|
if :room_status == :Available
status = :Unavailable

Choose a reason for hiding this comment

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

A room won't be just available or unavailable. A room's availability depends on the date.

# create module for reservations to hold classes
require 'pry'
require_relative 'hotel_admin.rb'
module Reservation

Choose a reason for hiding this comment

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

You should put each class in the same module. Grouping the classes into a common module is how we normally organize classes in our project.

# create new class of Room, to create the block of rooms
class Room
attr_reader :room_number
attr_accessor :status

Choose a reason for hiding this comment

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

A room won't have a set status. The status will depend on the date as well.

require_relative 'hotel_admin.rb'
module Reservation

class ReserveRoom

Choose a reason for hiding this comment

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

I would probably name this class Reservation

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