Console-based Library Management System: Design and Implementation, Exercises of Java Programming

A group assignment for developing a console-based library management system using java. The system includes classes for person (interface), librarian, academic (super class), student, lecturer, book (super class), digital, and hardcopy (sub classes). The assignment also covers creating a borrow class and implementing rules and regulations using a utils or rules class. Encapsulation, interfaces, static variables, methods, and blocks, exception handling, and input mechanisms are emphasized.

Typology: Exercises

2018/2019

Uploaded on 01/25/2019

Alazar_TIlahun
Alazar_TIlahun 🇪🇹

2 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Mekelle University
Ethiopian Institute of Technology Mekelle
School of Computing
Software Engineering Department
Group assignment
Title: Console based Library Management System
Write a console-based program for library management that implements the following
Class
Person →Interface
Librarian
Academic
Student
Lecturer
Borrow
Book
Digital
HardCopy
Attributes for the classes.
Book →super class
Fields
ID
Name
Number of pages
Publisher
Published date
Author
Digital →sub class
Fields
Size (in KB)
HardCopy → sub class
Fields
Number of books
Person →should be an interface
Fields
Id
Name
Phone
Email
Methods
default setter and getter for all attributes
Academic → super class implements Person interface
Fields
Department
Student →sub class extends Academic class
Fields
Year
Lecturer →sub class extends Academic class
Fields
Title (like GA I, GA II, Assistance Lecturer, Lecturer, Assistance Professor,
Associate Professor, Professor, or any other.)
Librarian → class implement Person interface
Fields
User name
Password
Borrow →class
pf3

Partial preview of the text

Download Console-based Library Management System: Design and Implementation and more Exercises Java Programming in PDF only on Docsity!

Ethiopian Institute of Technology – Mekelle School of Computing Software Engineering Department Group assignment Title: Console based Library Management System Write a console-based program for library management that implements the following Class ➢ Person →Interface ◦ Librarian ◦ Academic ▪ Student ▪ Lecturer ➢ Borrow ➢ Book ◦ Digital ◦ HardCopy Attributes for the classes. Book →super class Fields ✓ ID ✓ Name ✓ Number of pages ✓ Publisher ✓ Published date ✓ Author Digital →sub class Fields ✓ Size (in KB) HardCopy → sub class Fields ✓ Number of books Person →should be an interface Fields ✓ Id ✓ Name ✓ Phone ✓ Email Methods ✓ default setter and getter for all attributes Academic → super class implements Person interface Fields ✓ Department Student →sub class extends Academic class Fields ✓ Year Lecturer →sub class extends Academic class Fields ✓ Title (like GA I, GA II, Assistance Lecturer, Lecturer, Assistance Professor, Associate Professor, Professor, or any other.) Librarian → class implement Person interface Fields ✓ User name ✓ Password Borrow →class

Ethiopian Institute of Technology – Mekelle School of Computing Software Engineering Department Group assignment Fields ✓ ID ✓ Borrower Id ✓ Book Id ✓ Librarian Id ✓ Borrowed date ✓ Return date ✓ Status Have one class to set some rules or regulations. You can name it as Utils or Rule that have at least the following two constant, static, and final attributes ✓ MAX_BORROWED_BOOK which is 5 ✓ MAX_DAY_FOR_BOOK_TO_BE_RETURNED which is 3 days and add any other that you think important Notes that you should consider while developing the system

  • Use Encapsulation, any variable should be private and you should set a setter and getter method for all if necessary.
  • Interface and Abstract concepts should be implemented
  • You should have static variables, methods and blocks in the code in your own way
  • You should use super and this keywords in your code
  • You should Handle any Exception that might occur in your system and validate every input
  • When accepting password for Librarian it should be using System.console if possible else you can use any other Input Mechanisms.
  • Your program should display report in the console or write the data in the file according to your option. The system should let the user choose what to write in the file like ◦ Only student’s information ◦ Only Lecturer information ◦ Only Librarian Information ◦ Only Books Information ◦ Only Borrowed Books Information or History ◦ All Information
  • When you write a file use your own format to display. For example, to display list of students you can use ** List of Students ** Id Name Phone Department Year eitm/ur/0000/00 SSSSSS XXXXX YYYYYY DDDD eitm/ur/0000/00 CCCCC YYYYY BBBBBB IIIIIIII
  • You should be able to read from a file and store it your system. The system will have Import and Export mechanism. The file you write should be able to be read by the system and store in the system for manipulation purpose.
  • All your data should be stored in a HashMap ◦ HashMap is a Map based collection class that is used for storing Key & Values pairs. It is denoted as HashMap<Key, Value> or HashMap<K, V>. You have to import java.util.HashMap iin order to use HashMap class and methods. ▪ So, for this case you will have - HashMap<String, ArrayList> librerian = new HashMap<String, ArrayList>(); ◦ Here the String will be the keyword such as “digit”, “hard_copy”, “student”, “lecturer”, “librarian”, “borrow” and the value will be list of digit books, hard copy books, students, lecturers, librarians, borrowed books info.
  • The program you write should have the following options for each data