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 6715367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:36:23+00:00 2026-05-26T08:36:23+00:00

I have a reservation system that allows you to Book a reservation, Modify an

  • 0

I have a reservation system that allows you to Book a reservation, Modify an existing reservation, and Cancel an existing Reservation. I was looking into the Interface Segregation Principle and I was wondering how thin I should make my interfaces and if I am violation the Single Responsibility Princple. My intial design was:

interface IReservation
{
     void Book();
     void Modify();
     void Cancel(); 
}

but then I thought, what if one Reservation system, does not need to implement one of these methods for a reservation and is just concerned with Bookings for example, so I did the following:

interface IBook
{
     void Book();
}


interface IModify
{
    void Modify();
}

interface ICancel
{
    void Cancel();
}

Now I can do something like this:

interface IReservation : IBooking
{


}

or

interface IReservation : IBooking, IModify
{


}

So the question becomes am I taking it to far with thinning it out like this. Also, it becomes harder to think of names for the interface, for example, I don’t like IModify or ICancel (They just seem like methods to me that should be on the IReservation interface). How do you determine what should go into an interface and what should be segegrated out into another interface, class, etc…

  • 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-26T08:36:24+00:00Added an answer on May 26, 2026 at 8:36 am

    You have two things you have to consider when looking at the scope of your interfaces:

    1. Does it make sense to require every IReservation to implement these members?
    2. Does it make sense to reference member X without member Y?

    The first is what you’ve covered, and have arrived at a conclusion of “No”. The second, though is just as important. Does it make sense to think of something as “can modify” without it being able to do anything else? If not, consider making IReservation and IModifiableReservation, or some other grouping of functionality.

    For example, it seems like Cancel and Modify go hand-in-hand, so might want to put them both together on the IModifiableReservation, then have your class implement that interface.

    As you have it, that seems a little too granular.

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

Sidebar

Related Questions

I am developing a reservation system, and i have a function that save the
So I have to write a program that is a flight reservation system. If
I have a Reservation model that I'm searching for with three fields. The container_id
I have to design and implement a reservation system for a hotel. I have
I'm looking to create a simple short-lived reservation system, and I'd like to generate
I'm just wondering about large projects - say an airlines reservation system, how many
I am building a reservation system. I have users in roles('admin', 'client', 'employee', 'student').
So I have a method in a reservation model called add_equip. This method does
Can anyone help? I have a created a relationship between my Reservation(prim key) and
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a

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.