in this excercise, you will design and implement a library management system in
ID: 3874798 • Letter: I
Question
in this excercise, you will design and implement a library management system in Java. The library management system will be for an engineering school that has the following departments: Computer Engineering (CPEN), Electrical Engineering (ELEN), Industrial Engineering (IMEN), Mechanical Engineering (MEEN) and Civil Engineering (CIEN). The system will have the following requirements: Each book has a title, author, ISBN number, number of pages, edition, publisher and engineering type (CPEN, ELEN, IMEN, MEEN or CIEN) There are faculty accounts that have first name, last name, department, ID and position (adjunct professor, assistant professor, professor) and amount of borrowed books There are student accounts that have first name, last name, ID, department and level (1, 2, 3 or 4) and amount of borrowed books The library management system keeps track of books, and users by using files. One file handles book information One file handles user information One file registers a name and a borrowed book. There is a Registry class that holds a borrower’s ID and the ISBN number of the borrowed book. Students of levels 1 and 2 can only borrow up to 3 books, students of levels 3 and 4 can borrow up to 5 books. Faculty can borrow up to 6 books. When returning a book, you should input the amount of days the user held the book. The first 15 days are free, while extra days have a cost of $5.
Explanation / Answer
class LibMgm
{
String dept[]={"cepn","elen","imen","meen","cien"};
}
class Book
{
String title,author,publisher,en_type;
int isbn.no_of_page,edition;
}
class Borrower
{
String fname,lname,dept,pos
int id,level,book_borrowed;
}
class Registry
{
Borrower st=new Borrower();
st.getdetail();
if(st.level == 1 || st.level == 2)
{
if(st.book_borrowed > 3)
Syetm.out.println("Cant bottow more than 3 books");
exit;
}
if(st.level == 3 || st.level == 4)
{
if(st.book_borrowed > 5)
Syetm.out.println("Cant bottow more than 3 books");
exit;
}
if(st.pos != null)
{
if(st.book_borrowed > 6)
Syetm.out.println("Cant bottow more than 3 books");
exit;
}
}
Now you can implement the main program by using these classes.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.