Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6798305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:42:51+00:00 2026-05-26T18:42:51+00:00

I have to design and implement a reservation system for a hotel. I have

  • 0

I have to design and implement a reservation system for a hotel. I have

  • an array list of Reservation objects
  • an array list of room objects

I want to ‘reserve’ the room at a given date.

To book a room without a date would be easy but its the date part that’s complicating it. I’m struggling with the design of this and confident with a nudge in the right direction I could code it.

How do you say that a room is booked at this date but not at that date?

There is no database or anything its just an abstracted reservation system.

(I’ve been staring at this for a while, forgive me if if the solution is easy)

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:42:51+00:00Added an answer on May 26, 2026 at 6:42 pm

    EDIT — on second thought, why not just let each Room have a list of Reservation instances, which in turn have start/end properties that tell you when the reservation occurs?

    That way, to tell if a room has a reservation for a certain time, you just loop thru the reservations for the room and see if the time in question is within the start/end range of any of the reservations…granted that code is not too easy (nor too hard) to implement, but that’s the basic idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to implement singleten design pattern in iphone code I have one array.
I want to implement a design in Java where I have multiple event sources
I have basic knowledge of javascript and jquery . I want to implement design
I have a reservation system that allows you to Book a reservation, Modify an
I have to design and implement a Fortran routine to determine the size of
I’m in the situation that I have to design and implement a rather big
I have a Java project that I'm trying to implement with a model-view-controller design.
I am currently working on a project where I have to design / implement
I have to design and implement a program to accomplish drum stick matching (not
Intro We have a project to design and implement this semester. For our project,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.