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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:06:12+00:00 2026-06-03T00:06:12+00:00

I have to build a library management system and i’ve run into problems while

  • 0

I have to build a library management system and i’ve run into problems while trying to implement user types or profiles. I’ve already got a superclass user and two other subclasses of User, Student and Teacher, each with their own “characteristics”. The thing is i have to implement 7 types of users (5 types of students and 2 types of clerks) based on the number of books they can borrow and the amount of time they can keep the books until they have to return them. Those are the only 2 differences between the classes.

How would you implement this? Inheritance? I’m looking for a clever way to implement this and i would love to hear your thoughts on this.

Thank you very much.

  • 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-06-03T00:06:15+00:00Added an answer on June 3, 2026 at 12:06 am

    As a good rule of thumb, anywhere you see a noun in a project specification it’s a good candidate for a class. If those nouns have relationships in the project spec, they probably aught to have one in your code too.

    All of your people would fit in the category of a Userso perhaps this should be an interface they would all inherit. Down from this they appear to fit into two categories, Student and Staff perhaps these should also be abstract classes / interfaces. Then you have your 7 concrete classes. 2 inheriting Staff and 5 inheriting Student.

    So you’d end up with something like this..
    enter image description here

    Of course, this design depends on what every User must do, what every Staff / Student must do but I’ll leave the very specific details to you.

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

Sidebar

Related Questions

I have build a c# class library verification.dll using OpenCVSharp. This references OpenCvSharp.dll in
I have to build OEM versions of a COM library (DLL). Does anyone know
I have a C++ library that I build using Scons which is eventually linked
I am using System.Management.Automation to build a program that serves as a firewall, essentially,
I am using QCA and i have build the Library for Symbian 4.6.3 Debug
I have an android application which uses jni and I'm trying to automate build
I have a static library with two different targets: one to build for the
I have succeeded to build the log4cxx library both in debug and release mode
I'm trying to build my library with CMake. I'm working on CMakeLists.txt . I
Question Can I build a image database/library that has an e-commerce style checkout system

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.