Skip to content

Commit

Permalink
latest version of the discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
IBrahem-Elyamany committed Dec 21, 2023
1 parent e927b21 commit c62c75f
Show file tree
Hide file tree
Showing 24 changed files with 557 additions and 217 deletions.
81 changes: 68 additions & 13 deletions .idea/workspace.xml

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

Binary file modified data/covers/11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/covers/12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions data/datafiles/books_data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
10,,,1,,,Harry Potter and the Prisoner of Azkaban,,,J. K. Rowling,,,2023,,,true,,,200,,,4,,,Harry Potter and the Prisoner of Azkaban is a fantasy novel written by British author J. K. Rowling and is the third in the Harry Potter series. The book follows Harry Potter, a young wizard, in his third year at Hogwarts School of Witchcraft and Wizardry. Along with friends Ronald Weasley and Hermione Granger, Harry investigates Sirius Black, an escaped prisoner from Azkaban, the wizard prison, believed to be one of Lord Voldemort's old allies.,,,E:\ibrahem\oop\project6\1\library-system2\data\covers\1.jpg
HORROR,,,
10,,,2,,,Harry Potter and the Chamber of Secrets,,,J. K. Rowling,,,2020,,,true,,,200,,,3,,,Harry Potter and the Chamber of Secrets is a fantasy novel written by British author J. K. Rowling and the second novel in the Harry Potter series. The plot follows Harry's second year at Hogwarts School of Witchcraft and Wizardry, during which a series of messages on the walls of the school's corridors warn that the "Chamber of Secrets" has been opened and that the "heir of Slytherin" would kill all pupils who do not come from all-magical families. These threats are found after attacks that leave residents of the school petrified. Throughout the year, Harry and his friends Ron and Hermione investigate the attacks.,,,E:\ibrahem\oop\project6\1\library-system2\data\covers\2.jpg
ADVENTURE,,,
10,,,3,,,The Alchemist ,,,Paulo Coelho ,,,2021,,,true,,,200,,,1,,,The Alchemist (Portuguese: O Alquimista) is a novel by Brazilian author Paulo Coelho which was first published in 1988. Originally written in Portuguese, it became a widely translated international bestseller.[1][2] The story follows the shepherd boy Santiago in his journey across northern Africa to the pyramids of Egypt after he dreams of finding a treasure there.,,,E:\ibrahem\oop\project6\1\library-system2\data\covers\3.jpg
ADVENTURE,,,
10,,,4,,,A Tale of Two Cities,,,Charles Dickens,,,2023,,,true,,,200,,,4,,,A Tale of Two Cities is a historical novel published in 1859 by Charles Dickens, set in London and Paris before and during the French Revolution. The novel tells the story of the French Doctor Manette, his 18-year-long imprisonment in the Bastille in Paris, and his release to live in London with his daughter Lucie whom he had never met. The story is set against the conditions that led up to the French Revolution and the Reign of Terror.,,,E:\ibrahem\oop\project6\1\library-system2\data\covers\4.jpg
ADVENTURE,,,
10,,,5,,,The Little Prince ,,,Antoine de Saint-Exupéry,,,2020,,,true,,,200,,,2,,,The Little Prince (French: Le Petit Prince, pronounced [lə p(ə)ti pʁɛ̃s]) is a novella written and illustrated by French aristocrat, writer, and military pilot Antoine de Saint-Exupéry. It was first published in English and French in the United States by Reynal & Hitchcock in April 1943 and was published posthumously in France following liberation; Saint-Exupéry's works had been banned by the Vichy Regime. The story follows a young prince who visits various planets, including Earth, and addresses themes of loneliness, friendship, love, and loss. Despite its style as a children's book, The Little Prince makes observations about life, adults, and human nature.,,,E:\ibrahem\oop\project6\1\library-system2\data\covers\5.jpg
ADVENTURE,,,
10,,,6,,,Harry Potter and the Philosopher's Stone,,,J. K. Rowling,,,2021,,,true,,,200,,,2,,,Harry Potter and the Philosopher's Stone is a fantasy novel written by British author J. K. Rowling. The first novel in the Harry Potter series and Rowling's debut novel, it follows Harry Potter, a young wizard who discovers his magical heritage on his eleventh birthday, when he receives a letter of acceptance to Hogwarts School of Witchcraft and Wizardry. Harry makes close friends and a few enemies during his first year at the school and with the help of his friends, Ron Weasley and Hermione Granger, he faces an attempted comeback by the dark wizard Lord Voldemort, who killed Harry's parents, but failed to kill Harry when he was just 15 months old.,,,E:\ibrahem\oop\project6\1\library-system2\data\covers\6.jpg
ADVENTURE,,,
10,,,7,,,And Then There Were None,,,Agatha Christie,,,2023,,,true,,,200,,,4,,,And Then There Were None is a mystery novel by the English writer Agatha Christie, who described it as the most difficult of her books to write.[2] It was first published in the United Kingdom by the Collins Crime Club on 6 November 1939, as Ten Little Niggers,[3] after an 1869 minstrel song that serves as a major plot element.[4][5] The US edition was released in January 1940 with the title And Then There Were None, taken from the last five words of the song.[6] Successive American reprints and adaptations use that title, though American Pocket Books paperbacks used the title Ten Little Indians between 1964 and 1986. UK editions continued to use the original title until 1985.[7],,,E:\ibrahem\oop\project6\1\library-system2\data\covers\7.jpg
ADVENTURE,,,
10,,,8,,,The Hobbit,,,J. R. R. Tolkien,,,2020,,,true,,,200,,,3,,,The Hobbit, or There and Back Again is a children's fantasy novel by English author J. R. R. Tolkien. It was published in 1937 to wide critical acclaim, being nominated for the Carnegie Medal and awarded a prize from the New York Herald Tribune for best juvenile fiction. The book is recognized as a classic in children's literature and is one of the best-selling books of all time, with over 100 million copies sold.,,,E:\ibrahem\oop\project6\1\library-system2\data\covers\8.jpg
ADVENTURE,,,HORROR,,,
10,,,9,,,She: A History of Adventure,,,H. Rider Haggard,,,2021,,,true,,,200,,,1,,,She, subtitled A History of Adventure, is a novel by the English writer H. Rider Haggard, published in book form in 1887 following serialisation in The Graphic magazine between October 1886 and January 1887. She was extraordinarily popular upon its release and has never been out of print.,,,E:\ibrahem\oop\project6\1\library-system2\data\covers\9.jpg
ADVENTURE,,,
10,,,10,,,The Da Vinci Code,,,Dan Brown,,,2021,,,true,,,200,,,2,,,The Da Vinci Code is a 2003 mystery thriller novel by Dan Brown. It is Brown's second novel to include the character Robert Langdon: the first was his 2000 novel Angels & Demons. The Da Vinci Code follows symbologist Robert Langdon and cryptologist Sophie Neveu after a murder in the Louvre Museum in Paris causes them to become involved in a battle between the Priory of Sion and Opus Dei over the possibility of Jesus Christ and Mary Magdalene having had a child together.,,,E:\ibrahem\oop\project6\1\library-system2\data\covers\10.jpg
ADVENTURE,,,
1 change: 1 addition & 0 deletions data/datafiles/borrowers_data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5,,,3,,,user2,,,user2,,,111
1 change: 1 addition & 0 deletions data/datafiles/customers_data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5,,,2,,,user1,,,user1,,,111
Empty file.
5 changes: 5 additions & 0 deletions data/datafiles/order_data_user1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
5,,,1,,,1,,,2
5,,,2,,,2,,,2
5,,,3,,,3,,,1
5,,,4,,,5,,,2
5,,,5,,,7,,,2
3 changes: 3 additions & 0 deletions data/datafiles/reviews_data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
14,,,16,,,14,,,3,,,4,,,ghj
14,,,16,,,14,,,6,,,3,,,jjoo
14,,,16,,,14,,,2,,,5,,,hbjk
3 changes: 3 additions & 0 deletions data/datafiles/transaction_data_user2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
3,,,3,,,3,,,3,,,2023-12-21,,,2024-01-21
3,,,3,,,3,,,3,,,2023-12-21,,,2024-01-21
3,,,3,,,3,,,3,,,2023-12-21,,,2024-01-21
12 changes: 12 additions & 0 deletions src/main/java/com/asu/librarysystem/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ public Account(String userName, String password, String phoneNumber) {


}
public Account(int id, String userName, String password, String phoneNumber) {
this.id=id;
this.userName = userName;
this.Password = password;
this.phoneNumber = phoneNumber;
}
public void setIdCounter(int idCounter) {
this.idCounter=idCounter;
}
public int getIdCounter(){
return idCounter;
}

public void setPassword(String password) {
Password = password;
Expand Down
27 changes: 23 additions & 4 deletions src/main/java/com/asu/librarysystem/Book.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,41 @@ public class Book {



public Book(String title, String author, int publicationYear, boolean status, int price, int quantity
, String description, String coverPath, Category[] categories) {
public Book(int id,String title, String author, int publicationYear, boolean status, int price, int quantity, String descreption, String coverPath, ArrayList<Category> categories){
this.id=id;
this.title = title;
this.author = author;
this.publicationYear = publicationYear;
this.status = status;
this.price = price;
this.quantity = quantity;
this.description = descreption;
setCover(coverPath);
this.categories=categories;
}
public Book(String title, String author, int publicationYear, boolean status, int price, int quantity, String descreption, String coverPath){
this.id = ++idCounter;
this.title = title;
this.author = author;
this.publicationYear = publicationYear;
this.status = status;
this.price = price;
this.quantity = quantity;
this.description = description;

this.description = descreption;
setCover(coverPath);
}

public Book(String title, String author, int publicationYear, boolean status, int price, int quantity, String descreption, String coverPath, Category[] categories) {
this( title, author, publicationYear, status, price, quantity, descreption, coverPath);
this.categories = new ArrayList<Category>(Arrays.asList(categories));
}

public int getIdCounter() {
return idCounter;
}
public void setIdCounter(int idCounter) {
this.idCounter = idCounter;
}
public int getId() {
return id;
}
Expand Down
Loading

0 comments on commit c62c75f

Please sign in to comment.