0% found this document useful (0 votes)
7 views2 pages

Java Library Management System Code

The document outlines a mini-project for creating a library management system using object-oriented programming in Java. It details the class structure, including a Document class, Book, Multimedia, DVD, and CD classes, along with their attributes and methods. Additionally, it describes the Library class for managing documents and the main program requirements for user interaction and document management functionalities.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Java Library Management System Code

The document outlines a mini-project for creating a library management system using object-oriented programming in Java. It details the class structure, including a Document class, Book, Multimedia, DVD, and CD classes, along with their attributes and methods. Additionally, it describes the Library class for managing documents and the main program requirements for user interaction and document management functionalities.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Mini-Project . public void setAuthor(String author)modify the value attributed to the author.

. public String getTitle()returns the title of the book.


(Object Programming in Java) . public void setTitle(String title)modify the value assigned to the title
. public int getReference()returns the reference of the book.
Teacher: Dr. Riadh BOUSLIMI . public void setReference(int reference)modify the value assigned to the
reference.
We want to computerize the management of a library which is represented by the following class diagram:
. public void description()allows displaying the document description.

A Book class that inherits from the Document class and accepts:
o the attribute:
. private int numberOfPages
o and the methods:
. public Livre(Document d,int nombredepages) constructor that allows initialization
an object of type Book.
. public int getNumberOfPages()returns the number of pages in a book.
. public void setNumberOfPages(int numberOfPages)allows assigning a value
in the number of pages.
. public void description()allows you to display the book description.
An abstract class Multimediaand which admits:
o The attribute:
. protected float duration
o and the methods:
. public Multimedia(Document d, float duration)constructor that allows initialization
the multimedia object.
. public float getDuration()returns the duration of a multimedia document.
. public void setDuration(float duration)allows assigning a value to the duration attribute.
. public void description()allows displaying the multimedia description.
A DVD class that inherits from the Multimedia class and that admits:
o The attribute:
. private boolean bonus
o and the methods:
. public DVD(Multimedia m, boolean bonus)constructor that allows initialization
the DVD object.
Annotation :
. public boolean getBonus()returns the bonus value
protected
private . public void setBonus(boolean bonus)method for assigning a value
public to the bonus attribute.
. public void description()allows you to display the DVD description.
A CD class that inherits from the Multimedia class and allows:
Work requested o The attribute:
. private int numberOfBeaches
1. Create all the classes that are in the class diagram. o and the methods:
A DocumentClass: an abstract class whose: . public CD(Multimedia m, int numberOfTracks)constructor that allows
o its attributes are: to initialize the DVD object.
. protected String author
. protected String titre
. public int getNumberOfBeaches()returns the number of beaches
. protected int reference . public void setNumberOfBeaches(int numberOfBeaches)allows assigning a
o its methods are: value to the attribute numberofbeaches.
. public Document(String author, String title, int reference) allows
: . public void description()allows displaying the CD description.
d’initialiser l’objet.
. public String getAuthor()Return the author of the document.
Créer la classeBibliothequequi permet de gérer des documents et dont :
o the attributes are:
. private Document document[]
. private int numberofdocuments
o and the methods:
. public Library(Document documents[])allows to initialize the documents of
the library.
. public int getNumberOfDocuments() r:eturns the number of documents in the
library.
. public Document[] getDocuments()return all the documents from the library
. public void setDocument(Document documents[])allows to assign an array of
documents.
. public void getDocuments()returns the documents to the library.
. public void AddDocument(Document d)allows you to add a document in
a library
. public void RemoveDocument(Document d)allows you to delete a document from
the library. However, the list of the library's documents must be
compressed by making a shift.
. public void ListDocuments()allows displaying all the documents of the
library.
. public boolean FindDocument(Document d)allows you to search for a document
in a library and send back true if it exists and false otherwise.
. public static void main(String args[])main program that allows to:
Create the main menu of your library to match the display above.
underneath:
- Créer une bibliothèque qui comporte 20 documents de différents
types (CD, DVD, and Book). Therefore, the entry must be done via keyboard
using the class: "[Link]» ;
- Remove two documents.
- Search for a document;
- Display the list of all documents in the library.

Note: To terminate an object, you need to redefine the finalize() method which inherits from the Object class.

The file that will contain your compressed project must have your name, first name, and class (e.g.:

Flen_BenFlen_CLASSHowever, you are called to send it to me by email at my address.


email : [Link]@[Link]

Deadline to submit the work: 12/15/2019 at 12 AM

Good job

You might also like