Skip to content

evagapi/homework-java-ironlibrary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HW | Java IronLibrary (Unit 3 homework)

Made with 💙  by

Features

Navigate through a text-based menu to:

  • Add a new book to the library
  • Search for a book by its title
  • Search for a book by its category
  • Search for a book by its author
  • Display a table containing a list of all books along with their authors
  • Issue a book to a student
  • Display the information of the book issued to a student by their USN
  • Exit Application

Tech Stack

Getting Started

Prerequisites

Here's what you need to be able to run IronLibrary:

  • Java (version >= 21)
  • MySQL Database
  • Maven

1. Clone the repository

git clone https://github.com/evagapi/homework-java-ironlibrary.git
cd homework-java-ironlibrary

2. Install Maven dependencies

Using Command Line

mvn install

Using IntelliJ IDEA

  • Open IntelliJ IDEA.
  • Open the ironlibrary project.
  • Navigate to View > Tool Windows > Maven.
  • Click on Reload All Maven Projects icon to update dependencies.
  • Alternatively, right-click on pom.xml and select Reload Project.

Configure MySQL

Create your local profile resources file

You are provided with an example file named application-local_example.properties. Rename it to application-local.properties and change the properties to match your configuration:

spring.datasource.url=jdbc:mysql://localhost:[yourlocalhostport]/[yourdatabasename]?serverTimezone=UTC
spring.datasource.username=[youruser]
spring.datasource.password=[yourpassword]

First Run

The database will be automatically created the first time you run the application with the following configurations:

spring.profiles.active=local

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

spring.jpa.hibernate.ddl-auto=create

spring.jpa.show-sql=true

After the First Run

After the first run, you need to update the spring.jpa.hibernate.ddl-auto to update to prevent data overwriting. You can update spring.jpa.show-sql to false to disable SQL logging.

Documentation

UML Diagramm

classDiagram
    class Book {
        -int id
        -String isbn
        -String title
        -String category
        -int quantity
    }

    class Author {
        -int id
        -String name
        -String email
        -Book authorBook
    }

    class Issue {
        -int id
        -String issueDate
        -String returnDate
        -Student issueStudent
        -Book issueBook
    }

    class Student {
        -String usn
        -String email
    }

     Author --> Book
     Issue --> Student
     Issue --> Book

Loading

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%