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

library management system 40230212013 #25

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"java.project.sourcePaths": ["src"],
"java.project.outputPath": "bin",
"java.project.referencedLibraries": [
"lib/**/*.jar"
]
}
18 changes: 18 additions & 0 deletions Answers/40230212013/library_management_system/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Getting Started

Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.

## Folder Structure

The workspace contains two folders by default, where:

- `src`: the folder to maintain sources
- `lib`: the folder to maintain dependencies

Meanwhile, the compiled output files will be generated in the `bin` folder by default.

> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
## Dependency Management

The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 7 additions & 0 deletions Answers/40230212013/library_management_system/src/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public class App {
public static void main(String[] args) {
library library = new library("My Library", 100, "9:00 AM - 5:00 PM");
cli cli = new cli(library);
cli.start();
}
}
Binary file not shown.
15 changes: 15 additions & 0 deletions Answers/40230212013/library_management_system/src/admin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
public class admin extends user{
private int password;
public admin(String name,int id, String phoneNumber, int password)
{
super(name, id, phoneNumber);
this.password = password;
}
public int getPassword() {
return password;
}
public void setPassword(int password) {
this.password = password;
}

}
Binary file not shown.
58 changes: 58 additions & 0 deletions Answers/40230212013/library_management_system/src/book.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import java.util.UUID;

public class book {
private int bookId;
private String title;
private String author;
private boolean availabilityStatus;
private String description;
public book(String title, String author, String description)
{
this.bookId = UUID.randomUUID().hashCode();
this.title = title;
this.author = author;
this.availabilityStatus = true;
this.description = description;
}
@Override
public String toString() {
return "Book{" +
"bookID=" + bookId +
", title='" + title + '\'' +
", author='" + author + '\'' +
", available=" + availabilityStatus +
", description='" + description + '\'' +
'}';
}
public int getBookId() {
return bookId;
}
public void setBookId(int bookId) {
this.bookId = bookId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public boolean isAvailabilityStatus() {
return availabilityStatus;
}
public void setAvailabilityStatus(boolean availabilityStatus) {
this.availabilityStatus = availabilityStatus;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}

}
Binary file not shown.
Loading