Welcome to CodeRanch, Joe!
The only tools you need are a pencil, paper and an eraser.
When you have a description of the problem domain, you can start by writing down the nouns of the description, and how they interact with each other through verbs. You can then eliminate terms that are not related to the problem, or are too simple to be represented by a class. I condensed your problem description to the following sentences:
Books, CDs, DVDs and Blue-ray discs are items.A library offers items.Items have a title and an ISBN.Books have an author and a number of pages.CDs, DVDs and Blu-ray discs are discs.Discs hold multiple tracks of audio or video.Tracks have a title, artist and duration.
Relationships expressed by the verb 'to be' can be modeled by inheritance. For example, a
Book extends an
Item, and a
CompactDisc extends a
Disc.
Relationships expressed by a verb that indicates possession, such as 'to have' or 'to hold' can be modeled by a field inside the class. For example, a
Track has a field that refers to a
Duration.
Other verbs can be modeled by a method inside the class. You might have to mangle the verb a bit to get to a proper design. You also need to be creative and keep the real-world problem domain in your mind. For instance, the sentence "A library offers items" can be modeled inside the
Library class by a method "
Optional<Item> loan(Isbn isbn)" that takes the ISBN of the item you want to loan, and optionally returns an instance of the item that you want to loan (it might not return an item if the library is out of copies). This particular example is probably a little bit too advanced for your assignment, but you might use it as inspiration.
Do not be tempted to use primitive types unless the field is REALLY primitive. For instance, don't use
String to represent an artist. Use an
Artist class, which you can leave empty in the first stage of your design. Properties that are REALLY too primitive to be represented by a separate class include the number of pages of a book, which you may represent with an
int.
On a sheet of paper, draw a box for every noun you've extracted as a type from the description. At the top of the box, write the noun that the box represents. Inside the box, write the fields and the methods that you believe the class should contain. Draw arrows between boxes that have a relationship with each other, and next to the arrow write down what the relationship is. For instance, an arrow between a
Book and an
Author can be annotated with "written by" or "writes", depending on the direction of the arrow.
Finally, when you're happy with your design, you can use an UML tool to make a nice diagram of your design, to include with the solution of your assignment. Make sure to explain your design and choices.