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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:51:53+00:00 2026-06-11T16:51:53+00:00

I am working on a CS-101 assignment and am only allowed to use a

  • 0

I am working on a CS-101 assignment and am only allowed to use a single array. I have an array that looks like the following:

[Song, Song, Album, Fiction, Movie, Nonfiction, Song]

Here is the hierarchy for background (requirements from my assignment):

“At the top level you will have a class called Library. Library will have three subclasses: Music, Book, and Movie. Music will have two subclasses: Song and Album. Book will have two subclasses: Fiction and Nonfiction. Movie, Fiction, Nonfiction, Song,
and Album will not have any subclasses.”

I am currently trying to write a method that will sort the Books by their ISBN number. So Fiction and Nonfiction are subclasses of my Book class, which is a subclass of Library.

I hold everything in Library myLibrary[] = new Library[100];

I’m not sure how to go about retrieving the ISBN’s from the Books only and sort them since I am only allowed one array; otherwise I would love to make an array of Books, then sort those separately.

What are some hints / algorithms that I can utilize to accomplish this?

Update

I can post more code if needed. But this question is currently more focused on the approach.

  • 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-11T16:51:54+00:00Added an answer on June 11, 2026 at 4:51 pm

    Without trying to give the actual implementation of the algorithm, you should do an in-place sort where priority can be done by:

    1. Books have more priority than Music and Movies

    2. If two objects are Books then priority is based on ISBN

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

Sidebar

Related Questions

This is probably SVN 101, but I have to ask: I'm working on a
The goal of the assignment that I'm currently working on for my Data Structures
ok so this is the assignment that I'm working on: Implement a class Student
I am working with the following query.I want to use Date_Sent_to_Recorder in my other
Working with an undisclosed API, I found a function that can set the number
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
I have been working on a small Plagiarism detection engine which uses Idea from
I am working on a search query that does not seem to work. The
i am working wit h PostgreSQL 9 for an application, i have a database
I'm working on C programming assignment to implement Sieve of Eratosthenes without using the

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.