Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed Answers/Add Your Projects Here.txt
Empty file.
38 changes: 38 additions & 0 deletions Answers/_40230112134/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
3 changes: 3 additions & 0 deletions Answers/_40230112134/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Answers/_40230112134/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Answers/_40230112134/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions Answers/_40230112134/.idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Answers/_40230112134/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Answers/_40230112134/Book.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
5/f/f/f/true
6/g/g/g/true
7/hj/jkk/jk/true
8/979765/64894/56/true
49/888/88/88/true
956/asds/asdas/asds/true
104/sDA/ASDAS/add/true
288/4653/98465/8945632/true
940/lllllllllllll/lllllllllllll/lllllllllllll/true
871/;/'/'/true
66/;/;/;/true
3/d/d/d/true
2 changes: 2 additions & 0 deletions Answers/_40230112134/NormalUser.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
40230112134/ad/84965/2024-05-17
56/adfsgd/98465/2024-05-17
85 changes: 85 additions & 0 deletions Answers/_40230112134/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Library Management System

Welcome to our Library Management System (LMS) project! In this endeavor, we aim to implement a comprehensive library program with a user-friendly command-line interface (CLI). Our system caters to two distinct roles:

1. Normal Users
2. Admins

## Features

- New users can seamlessly sign up using their student ID and their information.
- Our system boasts a robust admin panel, with the ability to add new admins, books, and perform book removals.
- Normal users enjoy the convenience of borrowing and returning books hassle-free.
- Each user, whether normal or admin, can conveniently delete their account whenever necessary.

## Implementation Guidelines

Our project is grounded in Object-Oriented Programming (OOP) principles, leveraging the following key classes:

### Book

Each book is characterized by the following attributes:
- Unique bookID
- Title
- Author
- Availability status
- Description

Attributes are encapsulated within the Book class to maintain data integrity. Upon instantiation, a book's availability status is automatically status to true, and a unique bookID is generated.

### User

Users possess the following attributes:
- Name
- Unique ID
- Phone number

User information is essential for system operations, and each user is uniquely identified by an ID.

### Normal User

In addition to the standard user attributes, normal users are also timestamped with their date of registration.

### Admin

Admins share user attributes but possess additional privileges and authentication through a password.

### Rent

The Rent class acts as a bridge between users and books, facilitating book rental transactions. Key attributes include:
- Book object
- Normal user object
- Rental ID
- Rental date

### Library

The central hub of our system, the Library class encapsulates core library functionalities:
- Library name
- Capacity
- Operating hours
- Book repository
- User and rental registries

Methodologies like book rental, return, addition, and removal of members and books are seamlessly handled within the Library class.

## Command-Line Interface (CLI)

Our CLI class facilitates user interaction through intuitive commands:

- `lib add book <name> <author> <subtitle>`: Add a new book to the library.
- `lib get hrs`: Retrieve library operating hours.
- `lib rent <bookName>`: Rent a book from the library.
- `lib add member <studentID> <password>`: Add a new member to the library (admin privilege required).
- `lib rent <bookName> <memberName> <memberID>`: Rent a book for a specific member.
- `lib get available books`: View available books for rental.
- `lib remove member <memberID>`: Remove a member from the library (admin privilege required).
- `lib return <bookName>`: Return a rented book to the library.

## Getting Started

To start using our system, simply run the main class `MyApp` and follow the prompts.

## Conclusion

Thank you for choosing our Library Management System. We're excited to provide you with an efficient and user-friendly platform for all your library needs. Happy reading!
17 changes: 17 additions & 0 deletions Answers/_40230112134/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.example</groupId>
<artifactId>_40230112134</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

</project>
27 changes: 27 additions & 0 deletions Answers/_40230112134/src/main/java/org/example/Book.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.example;

import java.util.*;

public class Book extends UniqueID {
private String IDBook ;
private String Title , Author , Description;
private ArrayList<String> Total = new ArrayList<>();
private boolean AvailabilityStatus;
public Book()
{
this.AvailabilityStatus = true;
this.IDBook = getUniqueIDString();
}
public ArrayList<String> getTotal() { return Total; }
public void setTotal(ArrayList<String> total) { Total = total; }
public String getIDBook() { return IDBook; }
public void setIDBook(String IDBook) { this.IDBook = IDBook; }
public boolean getAvailabilityStatus(){ return AvailabilityStatus; }
public void setAvailabilityStatus(boolean availabilityStatus) { AvailabilityStatus = availabilityStatus; }
public void setAuthor(String author) { Author = author; }
public String getAuthor() { return Author; }
public String getDescription() { return Description; }
public void setDescription(String description) { Description = description; }
public void setTitle(String title) { Title = title; }
public String getTitle() { return Title; }
}
Loading