0% found this document useful (0 votes)
2 views3 pages

Project

The document outlines a project to develop a Library Movie Management System using Java, focusing on object-oriented programming principles such as inheritance, abstract classes, and interfaces. Key components include a LibraryItem abstract class, a Movie class with subclasses for different genres, and a Library class to manage movie collections. The project also involves creating a driver class for user interaction and a UML diagram to illustrate class relationships.

Uploaded by

talahsuwan05
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)
2 views3 pages

Project

The document outlines a project to develop a Library Movie Management System using Java, focusing on object-oriented programming principles such as inheritance, abstract classes, and interfaces. Key components include a LibraryItem abstract class, a Movie class with subclasses for different genres, and a Library class to manage movie collections. The project also involves creating a driver class for user interaction and a UML diagram to illustrate class relationships.

Uploaded by

talahsuwan05
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
You are on page 1/ 3

PRINCIPLES OF OBJECT ORIENTED PROGRAMMING - Java

Project
Library Movie Management System

Overview
This project involves building a *Library Movie Management System* to manage movies and
their associated information. The system allows users to add, view, and manage movies
available in the library. The project will be completed with a good structure and gradual
approach.

Key Concepts Included:


●​ Inheritance: Using superclass and subclasses.
●​ Abstract Class: Define common behaviors for movies in the library.
●​ Interface: For additional behaviors like borrowing a movie.
●​ ArrayList: To store and manage collections of movies.
●​ Driver Class: Contains the `main()` method to run the program.

Code Structure:
1.​ Create an abstract class “LibraryItem” with attributes:
●​ Id (int)
●​ Title (String)

2.​ Create class Movie that inherited from LibraryItem and implement Borrowable interface
●​ director (String)
●​ duration (int)
●​ Borrower (String)
●​ isBorrowed (boolean)
●​ Release Year (int)
●​ Implement method `getDetails()`: Returns a string of movie details.
●​ Implement method borrowItem
●​ Implement method returnItem
3.​ Create three subclasses that inherited from `Movie`:
a.​ ActionMovie:
i.​ Additional attributes: `mainActor` (string)
ii.​ Implement `getDetails()` to include all data in the description.
b.​ ComedyMovie:
i.​ Additional attributes: `comedian` (String).
ii.​ Implement `getDetails()` to include all data in the description.
c.​ DocumentaryMovie:
i.​ Additional attributes: `topic` (string).
ii.​ Implement `getDetails()` to include all data and the descriptions.

4.​ Create an Interface Borrowable , Define methods and Implement these method in
Movie class
a.​ borrowItem(): Marks the movie as Borrowed
b.​ returnItem(): Marks the movie as returned.

5.​ Create a `Library` Class


a.​ Contains an `ArrayList<Movie>` to store movies.
b.​ Methods:
i.​ addMovie(Movie movie)`: Adds a movie to the library.
ii.​ viewMovies()`: Displays all movies
iii.​ viewSpecificMovie()`: Displays specific movie
iv.​ SaveToFile() : Save data into File
v.​ loadFromFile() : Load data from File

6.​ Driver Class: `LibrarySystem`


a.​ Create a Driver class to test the Library and Movie classes as follow:
b.​ The main program to run everything.
c.​ Includes a *Menu-driven program* for:
i.​ Adding movies.
ii.​ Viewing all movies.
iii.​ Viewing specific movie details.
iv.​ Borrowing a movie
v.​ Returning a movie
vi.​ Save library data to file
vii.​ Load library data from file

Design a UML Diagram


●​ Create a UML diagram showing the relationships between classes, interfaces, and
methods. (use any free online tool to draw UML and save it as a PDF file)
Sample code Output:

MovieID|Title|Director|Duration|Year|(mainActor or comedian or topic)


"M001", "Inception", "Christopher Nolan", 148, 2010,"Leonardo DiCaprio"
"M002", "The Mask", "Chuck Russell", 101, 2013,"Jim Carrey"
"M003", "Planet Earth", "Alastair Fothergill", 2016 ,60, "Nature"
….

Good Luck

Dr: Mohammed Anan Hussien


​ Dr. Muhanad Al-Taweel

You might also like