Search code examples
class-diagramuse-caseactivity-diagram

What is the best way for me to start this UML diagram?


My mind is all over the place and I am not sure how to go about starting this UML diagram. This is the problem:

The library consists of a lot of publications in several types of media – books, periodicals (also called magazines), newspapers, audio, and video. Each publication falls into a particular genre – fiction, nonfiction, self-help, or performance – and target age – children, teen, adult, or restricted (which means adult only). Each publication also includes a unique ISBN identifier, which is just text. Design an object-oriented application that manages these publications as objects. We'll want to know the title, author, copyright year, genre, media, target age, and ISBN for each of our publications. We'll also want to know if the publication is checked in or checked out to a customer, and if checked out to a customer, who that customer is (their name and telephone number). It's OK to enter the customer information each time a publication is checked out. Each publication object should be able to print its contents and its check out status something like this:

“The Firm” by John Grisham, 1991 (adult fiction book) ISBN: 0440245923 Checked out to Mike Williams (817-272-3785)

We'll need a simple console application with 5 operations: (1) Create a new publication, (2) List all publications created in the system, (3) Check out a publication to a patron, recording their name and phone number, (4) Check in a publication that was previously checked out, and (5) some short, basic documentation on how to use the system. (Persistence is NOT required. Each time your program is run, it may start without publications.)

You should design this system in UML first, creating (at least) a basic Use Case diagram, an Activity diagram for at least action (3) above, and a class diagram.


Solution

  • For Use case diagram determine all the use cases and actors, then draw an use case diagram. Just google how such diagram looks like and create yours. For Activity diagram determine what steps these use cases would consist of and show on a diagram. For Class diagram identify all the candidate classes and think which ones you would keep or discard. You can also deterine attributes of each class. Then draw a diagram.