Skip to content
Merged
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
26 changes: 17 additions & 9 deletions src/model/Book.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,26 @@ public class Book {
private int publicationYear;
private boolean isBorrowed;


//Constructor
public Book(String title,String author,String isbn,int publicationYear,boolean isBorrowed){
this.title=title;
this.author=author;
this.isbn=isbn;this.publicationYear=publicationYear;
this.isBorrowed=isBorrowed;
}
//Setter
public void borrowBook() {
// TODO: Implement method 'borrowBook'.
throw new UnsupportedOperationException("Unimplemented method 'borrowBook'");
this.isBorrowed=true;
}

public void returnBook() {
// TODO: Implement method 'returnBook'.
throw new UnsupportedOperationException("Unimplemented method 'returnBook'");
}

public void getDetails() {
// TODO: Implement method 'getDetails'.
throw new UnsupportedOperationException("Unimplemented method 'getDetails'");
this.isBorrowed=false;
}
//Getter
public String getTitle() {return this.title;}
public String getAuthor() {return this.author;}
public String getIsbn() {return this.isbn;}
public Integer getPublicationYear() {return this.publicationYear;}
public boolean getIsBorrowed() {return this.isBorrowed;}
}
18 changes: 10 additions & 8 deletions src/model/Category.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
public class Category {
private String name;
private String description;

public void getName() {
// TODO: Implement method 'getName'.
throw new UnsupportedOperationException("Unimplemented method 'getName'");
//Constructor
public Category(String name,String description){
this.name=name;
this.description=description;
}

public void getDescription() {
// TODO: Implement method 'getDescription'.
throw new UnsupportedOperationException("Unimplemented method 'getDescription'");
//Getter
public String getName() {
return this.name;
}
public String getDescription() {
return this.description;
}
}