Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
28e6b5e
Library Name Subclass
Jstrine09 Mar 9, 2026
e51249a
Merge pull request #1 from Nishatlabiba98/James-Branch
Nishatlabiba98 Mar 9, 2026
bd13132
team
josemcastillo7 Mar 9, 2026
a946c93
interface
Nishatlabiba98 Mar 9, 2026
ec77aa8
Address Class
Zoedayz Mar 9, 2026
d39f478
LibraryItemClass
josemcastillo7 Mar 9, 2026
d35ab2b
Item
josemcastillo7 Mar 9, 2026
578e2fe
Josephs
josemcastillo7 Mar 9, 2026
a527d58
code
Nishatlabiba98 Mar 10, 2026
4ed5a66
Changes
josemcastillo7 Mar 10, 2026
4161ba2
Josephs branch (#2)
josemcastillo7 Mar 10, 2026
06bc5b3
James branch (#3)
Jstrine09 Mar 10, 2026
e761606
Address Class
Zoedayz Mar 10, 2026
86f30f8
saved changes
Zoedayz Mar 10, 2026
d0994ef
Merge branch 'master' of https://github.com/Nishatlabiba98/CentralLib…
Zoedayz Mar 10, 2026
beda9a4
Created test file for Person
Jstrine09 Mar 10, 2026
2ea086c
Address Test File works
Jstrine09 Mar 10, 2026
80b98d0
Corrected the Address test
Jstrine09 Mar 10, 2026
4e4c9bd
added Book.java
josemcastillo7 Mar 10, 2026
608faa3
Address Test File (#5)
Jstrine09 Mar 10, 2026
e4c81a6
book
josemcastillo7 Mar 10, 2026
db62f84
Merge branch 'master' into Josephs-Branch
Nishatlabiba98 Mar 10, 2026
20dc8c4
Josephs branch (#6)
josemcastillo7 Mar 10, 2026
f4a0008
Merge branch 'master' into James-Branch
Jstrine09 Mar 10, 2026
6ea1bf8
resolved merge conflict
Zoedayz Mar 10, 2026
767d3d3
Finished the Periodical File
Jstrine09 Mar 10, 2026
0a899dd
Periodical Test File complete
Jstrine09 Mar 11, 2026
41c2ab8
Finished the Periodical File (#7)
Jstrine09 Mar 11, 2026
19a8b7a
added jackson library to the pom file
Nishatlabiba98 Mar 11, 2026
e19c0b0
json
Nishatlabiba98 Mar 11, 2026
d004237
Book.java edits
Jstrine09 Mar 11, 2026
af3ba3f
Pom.xml
Jstrine09 Mar 11, 2026
82e681f
Changes to code format
Jstrine09 Mar 11, 2026
1c18186
Fixed Person test bug
Jstrine09 Mar 11, 2026
3561e41
booking
josemcastillo7 Mar 11, 2026
23578f5
title
josemcastillo7 Mar 11, 2026
93a0909
Checkpoint on Library.java file
Jstrine09 Mar 11, 2026
4fcaccd
author
josemcastillo7 Mar 11, 2026
d51c031
morning commit to update any minor grammar changes
Nishatlabiba98 Mar 11, 2026
07188fc
Merge branch 'master' of https://github.com/Nishatlabiba98/CentralLib…
Nishatlabiba98 Mar 11, 2026
8953902
Display and Search methods
Jstrine09 Mar 11, 2026
f631e04
test
josemcastillo7 Mar 11, 2026
f319739
commit
Nishatlabiba98 Mar 11, 2026
a4f68f5
commit
Nishatlabiba98 Mar 11, 2026
0aaa8d6
commit
Nishatlabiba98 Mar 11, 2026
1b96d41
Removed the overide because it isnt needed yet
Jstrine09 Mar 11, 2026
c6f5c43
new submit
josemcastillo7 Mar 11, 2026
996a6e7
Merge branch 'master' into Josephs-Branch
Nishatlabiba98 Mar 11, 2026
0496e5f
Merge branch 'Josephs-Branch' of https://github.com/Nishatlabiba98/Ce…
Nishatlabiba98 Mar 11, 2026
7225c30
Merge pull request #9 from Nishatlabiba98/Josephs-Branch
Nishatlabiba98 Mar 11, 2026
a7e267a
Corrected errors and am hopefully back to square 1
Jstrine09 Mar 11, 2026
93d6693
Merge pull request #10 from Nishatlabiba98/James-Branch
Nishatlabiba98 Mar 11, 2026
d9b0655
merge recent pr
josemcastillo7 Mar 11, 2026
c9660f9
librarymember, librarian
Nishatlabiba98 Mar 12, 2026
108dbc0
nishat
Nishatlabiba98 Mar 12, 2026
5e3f0b1
Merge branch 'master' of https://github.com/Nishatlabiba98/CentralLib…
josemcastillo7 Mar 12, 2026
6dc4608
movie
josemcastillo7 Mar 12, 2026
c9ae45f
Merge pull request #12 from Nishatlabiba98/Josephs-Branch
Nishatlabiba98 Mar 12, 2026
d8bcb8f
Merge branch 'master' of https://github.com/Nishatlabiba98/CentralLib…
Zoedayz Mar 12, 2026
78ec5dc
Merge branch 'master' of https://github.com/Nishatlabiba98/CentralLib…
Zoedayz Mar 12, 2026
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ deploy:
provider: script
script: "mvn test"
skip_cleanup: true
on:

tags: true
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
30 changes: 27 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
<?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">
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>com.zipcodewilmington</groupId>
<artifactId>central-library</artifactId>
<version>1.0-SNAPSHOT</version>

<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
</dependencies>

</project>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>


</project>
32 changes: 32 additions & 0 deletions src/main/java/com/zipcodewilmington/centrallibrary/Address.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.zipcodewilmington.centrallibrary;


public class Address{
private String street;
private String city;
private String state;
private String zipcode;

public Address(String street, String city, String state, String zipcode) {
this.street = street;
this.city = city;
this.state = state;
this.zipcode = zipcode;
}

public String getStreet() {return street; }
public String getCity() {return city; }
public String getState() {return state; }
public String getZipcode() {return zipcode; }

public void setStreet(String street) {this.street = street; }
public void setCity(String city) {this.city = city; }
public void setState(String state) {this.state = state; }
public void setZipcode(String zipCode) {this.zipcode = zipCode; }

@Override
public String toString() {
return street + ", " + city + ", " + state + ", " + zipcode;
}
}

45 changes: 45 additions & 0 deletions src/main/java/com/zipcodewilmington/centrallibrary/Book.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.zipcodewilmington.centrallibrary;

public class Book extends LibraryItem {

private String author;
private String genre; // move this also remove the getter and setter of isbn
private int pages;

public Book(String id, String title, String location, String author, String genre, String publicationDate, String isbn, int numberOfPages) {
super(id, title, location);
this.author = author;
this.genre = genre;
this.pages = numberOfPages;
//implement searchable fields
}

public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;

}

public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}

public int getPages() {
return pages;
}
public void setPages(int pages) {
this.pages = pages;

}

public String[] getSearchableFields() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getSearchableFields'");
}
}

20 changes: 20 additions & 0 deletions src/main/java/com/zipcodewilmington/centrallibrary/BookTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.zipcodewilmington.centrallibrary;

public class BookTest {

public static void main(String[] args) {

Book book = new Book("1", "The Great Gatsby", "Aisle 3", "F. Scott Fitzgerald", "Classic", "1925", "978-0743273565", 180);

System.out.println(book.getAuthor());
System.out.println(book.getGenre());
System.out.println(book.getPages());
System.out.println(book.isAvailable());
System.out.println(book.getLocation());
System.out.println(book.getId());
System.out.println(book.getTitle());

}

//something
}
54 changes: 54 additions & 0 deletions src/main/java/com/zipcodewilmington/centrallibrary/DVD.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.zipcodewilmington.centrallibrary;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.time.LocalDate;
import java.time.temporal.ChronoUnit;

// Base class (superclass) DVD
public abstract class DVD extends LibraryItem implements Reservable {
private String Title;
private String Director;
private String Duration;
private String Rating;
private String Genre;
private boolean Borrowed;

public String getTitle() {
return Title;
}

public String getDirector() {
return Director;
}

public String getGenre() {
return Genre;
}

public String getRating() {
return Rating;
}

public interface Reserveable {
void reserve(String user);
boolean isReserved();
}


public String getType() {
return "DVD";
}


public int getBorrowedDays() {
return 7;
}


public double getLateFeePerDay() {
return 1.00;
}

}
76 changes: 76 additions & 0 deletions src/main/java/com/zipcodewilmington/centrallibrary/Library.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
package com.zipcodewilmington.centrallibrary;

import java.util.ArrayList;
import java.util.List;

public abstract class Library {
private String name;
private Address address;
private List<LibraryItem> items;
private List<LibraryMember> members;
private List<Librarian> librarians;


public Library(String name, Address address) {
this.name = name;
this.address = address;
this.items = new ArrayList<>();
this.members = new ArrayList<>();
this.librarians = new ArrayList<>();
}

public String getName() {
return name;
}
public Address getAddress() {
return address;
}
public List<LibraryItem> getItems() {
return items;
}
public List<LibraryMember> getMembers() {
return members;
}
public List<Librarian> getLibrarians() {
return librarians;
}

public void addItem(LibraryItem item) {
items.add(item);
}
public void removeItem(LibraryItem item) {
items.remove(item);
}
public void addMember(LibraryMember member) {
members.add(member);
}
public void addLibrarian(Librarian librarian) {
librarians.add(librarian);
}

public List<LibraryItem> search(String keyword) {
List<LibraryItem> results = new ArrayList<>();
for (LibraryItem item : items) {
if (item.matchesKeyword(keyword)) {
results.add(item);
}
}
return results;
}
public void displayAllItems() {
for (LibraryItem item : items) {
System.out.println(item.getItemType() + " | " + item.getTitle() + " | " + (item.isAvailable() ? "Available" : "Checked Out"));
}
}

public void generateLateFeeReport() {
for (LibraryMember member : members) {
System.out.println("Member: " + member.getName());
for (LibraryItem item : member.getBorrowedItems()) {
System.out.println(" - " + item.getTitle()
+ " | Max Days: " + item.getMaxBorrowDays()
+ " | Daily Fee: $" + item.calculateLateFee(1));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
package com.zipcodewilmington.centrallibrary;

public class LibraryItem {

private String id;
private String title;
private String location;
private boolean isAvailable;
private String isbn;


//constructor
public LibraryItem() {

}

public LibraryItem(String id, String title, String location){
this.id = id;
this.title = title;
this.location = location;
this.isAvailable = true;

}



public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}

public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}

public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}

public boolean isAvailable() {
return isAvailable;
}
public void setAvailable(boolean available) {
isAvailable = available;
}

public void checkOut() {
if (!isAvailable) throw new IllegalStateException(title + " is already checked out.");
this.isAvailable = false;

}

public void checkIn() {
this.isAvailable = true;

}
public String getIsbn() {
return isbn;
}
public void setIsbn(String isbn) {
this.isbn = isbn;
}


public boolean matchesKeyword(String keyword) {
for (String field : getSearchableFields()) {
if (field != null && field.toLowerCase().contains(keyword.toLowerCase())) {
return true;
}
}
return false;
}
}


Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.zipcodewilmington.centralibrary;
package com.zipcodewilmington.centrallibrary;

/**
* Created by n3pjk on 6/9/2025.
Expand Down
Loading
Loading