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

  • Home
  • SEARCH
  • 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 9172289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:18:36+00:00 2026-06-17T16:18:36+00:00

This question is difficult to articulate but here goes: I have a set of

  • 0

This question is difficult to articulate but here goes:

I have a set of classes with the following relationship :

diagram

The issue comes when I’m trying to access the data. I’m trying to do this as efficiently as possible. The user should be able to look up a course and its sections, a professor and its sections, a section and its students (implying a professor/student relationship), a section and its professor (a section doesn’t have more than one professor). Also sections don’t care about which courses they belong to but courses do care about their sections.

I should be able to say, for example, professorA.listSections(); or professorA.listSections() etc.

I’m honestly not sure how to go about doing this in an efficient manner (if there is one). Any design patterns or ideas would be greatly appreciated.

  • 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-17T16:18:37+00:00Added an answer on June 17, 2026 at 4:18 pm

    It looks like you already mapped out most of the things, now all you have to do is connect between the entities:

    • Each professor object should have a list of courses that he teaches.
    • Each Student object should have a list of courses that he studies.

    But on the Student case – he should have something “extra”: since every course could be taught by more than one Professor, the Student needs a way to “know” which professor teaches the course each he takes (another “extra” field).

    I’m not sure I understand the sections thing – but it can be done in the same manner.

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

Sidebar

Related Questions

I have this question. But it will be difficult for me to explain as
This is a difficult question to articulate, but I'll give it my best: Basically
I know this question is difficult to understand but I need a mathematical equation
This seems like a simple question, but it is difficult to search for. I
This seems like a simple question, but has proven to be difficult to find
Difficult to explain this Question, but im currently passing variables in a php page
My apologies if this question has been answered already - I have searched, but
Difficult to explain this question. I am attempting to create a set of UIButtons
I apologize if this question is a bit broad, but I'm having a difficult
I saw variants of this question before, but didn't find answer yet. I have

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.