Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

So many details but it was good! #36

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b916ce0
Created project files.
HJavid010 May 9, 2024
aa1cd14
Files added by IDE automatically.
HJavid010 May 9, 2024
4ef85f0
Added Dependencies (mysql jdbc driver & apache commons-codec)
HJavid010 May 9, 2024
cd62205
Added Book class.
HJavid010 May 16, 2024
3da5bdc
Added Password class for storing hashed admin passwords.
HJavid010 May 16, 2024
bff9cf2
Added Users classes and two constructors for each(because database ha…
HJavid010 May 16, 2024
a6265ff
created Rent class (maybe change in future)
HJavid010 May 16, 2024
b7ece90
created Library class based on database structure and created a getIn…
HJavid010 May 16, 2024
1d3ee45
added resultSetToBookArrayList for future books handling
HJavid010 May 16, 2024
2e58f36
Added different listBooks methods with filters.
HJavid010 May 16, 2024
a818e2f
Added addBook method.
HJavid010 May 16, 2024
7d73663
Added removeBook method.
HJavid010 May 16, 2024
bf4c4f1
Added getUser method.
HJavid010 May 16, 2024
910175a
created first cli implementation and login logic.
HJavid010 May 16, 2024
30f65f9
added Option class for handling options that user selects and organiz…
HJavid010 May 16, 2024
50519f3
added OptionSelector class to check for argument and run the desired …
HJavid010 May 16, 2024
1da608a
moving Printing errors to a new class because of repetition.
HJavid010 May 16, 2024
f3525e7
moving functions that handles user inputs and related regexes to a ne…
HJavid010 May 16, 2024
272e25b
created main(Myapp) class that launches the app.
HJavid010 May 16, 2024
9acbfa7
implementing Book toString method.
HJavid010 May 16, 2024
6c31cae
added a regex to split user input arguments.
HJavid010 May 16, 2024
175140e
added addAdminUser method to library.
HJavid010 May 16, 2024
0641412
added addNormalUser method to library.
HJavid010 May 16, 2024
8d7633e
added removeUser method to library.
HJavid010 May 16, 2024
3b94e62
added some test option for admin users. (will be moved outside of met…
HJavid010 May 16, 2024
c62f562
initial support for help for commands.
HJavid010 May 16, 2024
23be0c8
added help function to show all helps for command in an Option list.
HJavid010 May 16, 2024
e3c80f6
printing help when a command not found.
HJavid010 May 16, 2024
b88e366
added verifyPhoneNumber method.
HJavid010 May 16, 2024
0c34a92
Code Cleanup.
HJavid010 May 16, 2024
fb7e755
Added first codes for Rent.
HJavid010 May 16, 2024
e51411d
fixed typo in rentBook method
HJavid010 May 16, 2024
1f95057
added returnBook method
HJavid010 May 16, 2024
440edcd
list available books is now handling available book by Rents table.
HJavid010 May 16, 2024
94eb923
safe deleting isAvailable for Book.
HJavid010 May 16, 2024
9a93995
fixed a logic in listBooks method.
HJavid010 May 16, 2024
e32aac6
added get Admin and Normal users list methods.
HJavid010 May 16, 2024
1aa1711
moved Options creation outside of loop.
HJavid010 May 16, 2024
c8e496c
encapsulated Book class
HJavid010 May 16, 2024
2b0605f
added verification for some user inputs.
HJavid010 May 16, 2024
ecc85ee
added toString methods for Users.
HJavid010 May 16, 2024
1e83fcc
added list user option for admin.
HJavid010 May 16, 2024
6c97bfc
fixed typo in returnBook method.
HJavid010 May 16, 2024
b2beb17
fixed typo in rentBook method.
HJavid010 May 16, 2024
f492e4a
added get operation hours for library
HJavid010 May 16, 2024
f772d0e
added help for Normal User.
HJavid010 May 16, 2024
af7445f
added get and set hours options
HJavid010 May 16, 2024
f4198f9
added rent and return option for admin
HJavid010 May 16, 2024
eb1846a
code clean up.
HJavid010 May 16, 2024
8bffb3f
added removeUser with username
HJavid010 May 16, 2024
00dac53
completed Users helps.
HJavid010 May 16, 2024
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
38 changes: 38 additions & 0 deletions Answers/40230112037/Library-Management-System/.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

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

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

14 changes: 14 additions & 0 deletions Answers/40230112037/Library-Management-System/.idea/misc.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/40230112037/Library-Management-System/.idea/vcs.xml

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

35 changes: 35 additions & 0 deletions Answers/40230112037/Library-Management-System/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?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.LMS</groupId>
<artifactId>Library-Management-System</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>

<dependencies>

<!-- https://mvnrepository.com/artifact/com.mysql/mysql-connector-j -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.4.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.17.0</version>
</dependency>

</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package org.LMS;

public class Book {
private final String title, author, description;
private int id;

public Book(int id, String title, String author, String description) {
this.id = id;
this.title = title;
this.author = author;
this.description = description;
}

public Book(String title, String author, String description) {
this.title = title;
this.author = author;
this.description = description;
}

@Override
public String toString() {
return "Id:" + id + "\tTitle: " + title + "\tAuthor: " + author + "\tDescription: " + description;
}

public String getAuthor() {
return author;
}

public String getDescription() {
return description;
}

public int getId() {
return id;
}

public String getTitle() {
return title;
}
}
Loading