From fd0354484241f64b747b57438b57ad091bf15582 Mon Sep 17 00:00:00 2001 From: NilouAfsharAP <132682521+NilouAfsharAP@users.noreply.github.com> Date: Mon, 29 May 2023 19:12:31 +0330 Subject: [PATCH] Add files via upload --- RentalProject/RentalProject/pom.xml | 25 ++ .../RentalProject/project_should_be_here | 0 .../src/main/java/AllModules.java | 52 +++ .../RentalProject/src/main/java/Book.java | 32 ++ .../RentalProject/src/main/java/Customer.java | 46 +++ .../RentalProject/src/main/java/Game.java | 32 ++ .../RentalProject/src/main/java/Item.java | 40 +++ .../RentalProject/src/main/java/Main.java | 79 +++++ .../RentalProject/src/main/java/Movie.java | 33 ++ .../RentalProject/src/main/java/Rental.java | 71 +++++ .../src/main/java/RentalStore.java | 160 ++++++++++ .../RentalProject/src/test/TestYourFork.json | 301 ++++++++++++++++++ .../target/classes/AllModules.class | Bin 0 -> 2051 bytes .../RentalProject/target/classes/Book.class | Bin 0 -> 1043 bytes .../target/classes/Customer.class | Bin 0 -> 1355 bytes .../RentalProject/target/classes/Game.class | Bin 0 -> 1047 bytes .../RentalProject/target/classes/Item.class | Bin 0 -> 1006 bytes .../RentalProject/target/classes/Main$1.class | Bin 0 -> 455 bytes .../RentalProject/target/classes/Main.class | Bin 0 -> 3172 bytes .../RentalProject/target/classes/Movie.class | Bin 0 -> 1040 bytes .../RentalProject/target/classes/Rental.class | Bin 0 -> 1828 bytes .../target/classes/RentalStore.class | Bin 0 -> 6503 bytes 22 files changed, 871 insertions(+) create mode 100644 RentalProject/RentalProject/pom.xml create mode 100644 RentalProject/RentalProject/project_should_be_here create mode 100644 RentalProject/RentalProject/src/main/java/AllModules.java create mode 100644 RentalProject/RentalProject/src/main/java/Book.java create mode 100644 RentalProject/RentalProject/src/main/java/Customer.java create mode 100644 RentalProject/RentalProject/src/main/java/Game.java create mode 100644 RentalProject/RentalProject/src/main/java/Item.java create mode 100644 RentalProject/RentalProject/src/main/java/Main.java create mode 100644 RentalProject/RentalProject/src/main/java/Movie.java create mode 100644 RentalProject/RentalProject/src/main/java/Rental.java create mode 100644 RentalProject/RentalProject/src/main/java/RentalStore.java create mode 100644 RentalProject/RentalProject/src/test/TestYourFork.json create mode 100644 RentalProject/RentalProject/target/classes/AllModules.class create mode 100644 RentalProject/RentalProject/target/classes/Book.class create mode 100644 RentalProject/RentalProject/target/classes/Customer.class create mode 100644 RentalProject/RentalProject/target/classes/Game.class create mode 100644 RentalProject/RentalProject/target/classes/Item.class create mode 100644 RentalProject/RentalProject/target/classes/Main$1.class create mode 100644 RentalProject/RentalProject/target/classes/Main.class create mode 100644 RentalProject/RentalProject/target/classes/Movie.class create mode 100644 RentalProject/RentalProject/target/classes/Rental.class create mode 100644 RentalProject/RentalProject/target/classes/RentalStore.class diff --git a/RentalProject/RentalProject/pom.xml b/RentalProject/RentalProject/pom.xml new file mode 100644 index 0000000..5f12edd --- /dev/null +++ b/RentalProject/RentalProject/pom.xml @@ -0,0 +1,25 @@ + + + 4.0.0 + + org.example + RentalTest + 1.0-SNAPSHOT + + + + com.google.code.gson + gson + 2.10.1 + + + + + 17 + 17 + UTF-8 + + + \ No newline at end of file diff --git a/RentalProject/RentalProject/project_should_be_here b/RentalProject/RentalProject/project_should_be_here new file mode 100644 index 0000000..e69de29 diff --git a/RentalProject/RentalProject/src/main/java/AllModules.java b/RentalProject/RentalProject/src/main/java/AllModules.java new file mode 100644 index 0000000..e891916 --- /dev/null +++ b/RentalProject/RentalProject/src/main/java/AllModules.java @@ -0,0 +1,52 @@ + + +import java.util.ArrayList; + + public class AllModules { + private ArrayList customers; + private ArrayList books; + private ArrayList games; + private ArrayList movies; + private ArrayList rentals; + + public ArrayList getCustomers() { + return customers; + } + + public void setCustomers(ArrayList customers) { + this.customers = customers; + } + + public ArrayList getBooks() { + return books; + } + + public void setBooks(ArrayList books) { + this.books = books; + } + + public ArrayList getGames() { + return games; + } + + public void setGames(ArrayList games) { + this.games = games; + } + + public ArrayList getMovies() { + return movies; + } + + public void setMovies(ArrayList movies) { + this.movies = movies; + } + + public ArrayList getRentals() { + return rentals; + } + + public void setRentals(ArrayList rentals) { + this.rentals = rentals; + } + } + diff --git a/RentalProject/RentalProject/src/main/java/Book.java b/RentalProject/RentalProject/src/main/java/Book.java new file mode 100644 index 0000000..98fbfe1 --- /dev/null +++ b/RentalProject/RentalProject/src/main/java/Book.java @@ -0,0 +1,32 @@ + +import java.util.*; + +class Book extends Item { + private final String author; + private final String publisher; + private boolean availableForRent; + + public Book(String title, String genre, Date releaseDate, double rentalFee, String author, String publisher , long id) { + super(title, genre, releaseDate, rentalFee , id); + this.author = author; + this.publisher = publisher; + this.availableForRent = true; + } + + public String getAuthor() { + return author; + } + + public String getPublisher() { + return publisher; + } + + public boolean isAvailableForRent() { + return availableForRent; + } + + public void setAvailableForRent(boolean availableForRent) { + this.availableForRent = availableForRent; + } + +} \ No newline at end of file diff --git a/RentalProject/RentalProject/src/main/java/Customer.java b/RentalProject/RentalProject/src/main/java/Customer.java new file mode 100644 index 0000000..15471cf --- /dev/null +++ b/RentalProject/RentalProject/src/main/java/Customer.java @@ -0,0 +1,46 @@ +import java.util.*; + +public class Customer { + private String name; + private String email; + private String phone; + private String address; + private long id; + private List rentals; + + public Customer(String name, String email, String phone, String address, long id) { + this.name = name; + this.email = email; + this.phone = phone; + this.address = address; + this.id = id; + this.rentals = new ArrayList(); + } + + public long getId() { + return id; + } + + public String getName() { + return name; + } + + public String getEmail() { + return email; + } + + public String getPhone() { + return phone; + } + + public String getAddress() { + return address; + } + + public List getRentals() { + return rentals; + } + + public void addRent(Rental rental) { + } +} diff --git a/RentalProject/RentalProject/src/main/java/Game.java b/RentalProject/RentalProject/src/main/java/Game.java new file mode 100644 index 0000000..9496422 --- /dev/null +++ b/RentalProject/RentalProject/src/main/java/Game.java @@ -0,0 +1,32 @@ + +import java.util.*; + +public class Game extends Item { + private final String platform; + private final String publisher; + private boolean availableForRent; + + public Game(String title, String genre, Date releaseDate, double rentalFee, String platform, String publisher , long id) { + super(title, genre, releaseDate, rentalFee, id); + this.platform = platform; + this.publisher = publisher; + this.availableForRent = true; + } + + public String getPlatform() { + return platform; + } + + public String getPublisher() { + return publisher; + } + + public boolean isAvailableForRent() { + return availableForRent; + } + + public void setAvailableForRent(boolean availableForRent) { + this.availableForRent = availableForRent; + } + +} diff --git a/RentalProject/RentalProject/src/main/java/Item.java b/RentalProject/RentalProject/src/main/java/Item.java new file mode 100644 index 0000000..1986fe0 --- /dev/null +++ b/RentalProject/RentalProject/src/main/java/Item.java @@ -0,0 +1,40 @@ + +import java.util.*; +public class Item { + + private String title; + private String genre; + private Date releaseDate; + protected double rentalFee; + private long id; + + public Item( String title, String genre, Date releaseDate, double rentalFee , long id) { + + this.title = title; + this.genre = genre; + this.releaseDate = releaseDate; + this.rentalFee = rentalFee; + this.id = id; + } + + public long getId() { + return id; + } + + public String getTitle() { + return title; + } + + public String getGenre() { + return genre; + } + + public Date getReleaseDate() { + return releaseDate; + } + + public double getRentalFee() { + return rentalFee; + } + +} diff --git a/RentalProject/RentalProject/src/main/java/Main.java b/RentalProject/RentalProject/src/main/java/Main.java new file mode 100644 index 0000000..00a6e0e --- /dev/null +++ b/RentalProject/RentalProject/src/main/java/Main.java @@ -0,0 +1,79 @@ +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; +import java.io.*; + +public class Main { + public static void main(String[] args) throws IOException { + System.out.println("Hi!"); + Gson gson = new Gson(); + Reader reader = new FileReader("C:\\Users\\nilofar\\Rental Clone\\RentalSystem\\RentalProject\\src\\test\\TestYourFork.json");//open the input file + AllModules allModules = gson.fromJson(reader, new TypeToken() { + }.getType()); + + Customer Joshn = allModules.getCustomers().get(0); + Customer Emily = allModules.getCustomers().get(1); + Customer Michael = allModules.getCustomers().get(2); + + for (Book newBook : allModules.getBooks()) { + if (newBook.getId() == 3) { + RentalStore.rentBook(newBook, Joshn); + } else if (newBook.getId() == 6) { + RentalStore.rentBook(newBook, Joshn); + } + } + for (Book newBook1 : allModules.getBooks()) { + if (newBook1.getId() == 1) { + RentalStore.rentBook(newBook1, Emily); + } else if (newBook1.getId() == 7) { + RentalStore.rentBook(newBook1, Emily); + } + } + for (Book newBook2 : allModules.getBooks()) { + if (newBook2.getId() == 9) { + RentalStore.rentBook(newBook2, Michael); + } else if (newBook2.getId() == 4) { + RentalStore.rentBook(newBook2, Michael); + } + } + + for (Game newGame : allModules.getGames()) { + if (newGame.getId() == 3) { + RentalStore.rentGame(newGame, Joshn); + } else if (newGame.getId() == 6) { + RentalStore.rentGame(newGame, Joshn); + } + } + for (Game newGame1 : allModules.getGames()) { + if (newGame1.getId() == 1) { + RentalStore.rentGame(newGame1, Emily); + } else if (newGame1.getId() == 7) { + RentalStore.rentGame(newGame1, Emily); + } + } + for (Game newGame2 : allModules.getGames()) { + if (newGame2.getId() == 9) { + RentalStore.rentGame(newGame2, Michael); + } else if (newGame2.getId() == 4) { + RentalStore.rentGame(newGame2, Michael); + } + } + + reader.close(); + + + + Gson writing = new Gson(); + String json = writing.toJson(allModules); + String filePath ="C:\\Users\\nilofar\\Rental Clone\\RentalSystem\\RentalProject\\src\\test\\TestYourFork.json"; + try { + FileWriter writer = new FileWriter(filePath); + writer.write(json); + writer.close(); + System.out.println("JSON Data has been updated"); + } + catch (IOException e){ + e.printStackTrace(); + } + } + } + diff --git a/RentalProject/RentalProject/src/main/java/Movie.java b/RentalProject/RentalProject/src/main/java/Movie.java new file mode 100644 index 0000000..5fe9bee --- /dev/null +++ b/RentalProject/RentalProject/src/main/java/Movie.java @@ -0,0 +1,33 @@ + +import java.util.*; + + public class Movie extends Item { + private final String director; + private final String cast; + private boolean availableForRent; + + public Movie(String title, String genre, Date releaseDate, double rentalFee, String director, String cast, long id) { + super(title, genre, releaseDate, rentalFee, id); + this.director = director; + this.cast = cast; + this.availableForRent = true; + } + + public String getDirector() { + return director; + } + + public String getCast() { + return cast; + } + + public boolean isAvailableForRent() { + return availableForRent; + } + + public void setAvailableForRent(boolean availableForRent) + { + this.availableForRent = availableForRent; + } + + } diff --git a/RentalProject/RentalProject/src/main/java/Rental.java b/RentalProject/RentalProject/src/main/java/Rental.java new file mode 100644 index 0000000..145914f --- /dev/null +++ b/RentalProject/RentalProject/src/main/java/Rental.java @@ -0,0 +1,71 @@ +import java.util.*; + +public class Rental{ + + private Customer customer; + private Movie movie; + private Game game; + private Book book; + private long id; + private Date rentalDate; + private Date returnDate; + + public Rental(Movie movie , Customer customer , long id) { + this.movie = movie; + this.customer = customer; + this.id = id; + this.rentalDate = new Date(); + } + + public Rental(Game game , Customer customer , long id) { + this.game = game; + this.customer = customer; + this.id = id; + this.rentalDate = new Date(); + } + + public Rental(Book book , Customer customer , long id) { + this.book = book; + this.customer = customer; + this.id = id; + this.rentalDate = new Date(); + } + + public Customer getCustomer() { + return customer; + } + + public Movie getMovie() { + return movie; + } + + public Game getGame() { + return game; + } + + public Book getBook() { + return book; + } + + public long getId() { + return id; + } + + public Date getRentalDate() { + return rentalDate; + } + + public Date getReturnDate() { + return returnDate; + } + + public void setReturnDate(Date returnDate){ + this.returnDate = returnDate; + } + + public double calculateFee(){ + double feePerDay = 1.2; + return (feePerDay*(returnDate.getDate()-rentalDate.getDay())); + } + +} \ No newline at end of file diff --git a/RentalProject/RentalProject/src/main/java/RentalStore.java b/RentalProject/RentalProject/src/main/java/RentalStore.java new file mode 100644 index 0000000..d39a632 --- /dev/null +++ b/RentalProject/RentalProject/src/main/java/RentalStore.java @@ -0,0 +1,160 @@ +import java.util.ArrayList; + +public class RentalStore { + public static ArrayList memberC = new ArrayList<>(); + public static ArrayList movieList = new ArrayList<>(); + public static ArrayList gameList = new ArrayList<>(); + public static ArrayList bookList = new ArrayList<>(); + public static ArrayList rentalList = new ArrayList<>(); + + public static void register(Customer customer) { + memberC.add(customer); + } + + public static void addMovie(Movie movie) { + movieList.add(movie); + } + + public static void addGame(Game game) { + gameList.add(game); + } + + public static void addBook(Book book) { + bookList.add(book); + } + + public static void removeMovie(Movie movie) { + if (movie.isAvailableForRent()) + movieList.remove(movie); + else { + System.out.println("it's not available"); + } + } + + public static void getAvailableMovies() { + System.out.println("Here is list of available movies for rent: "); + int i = 1; + for (Movie movie : movieList) { + if (movie.isAvailableForRent()) + System.out.println( + i + ". " + movie.getTitle() + " by " + movie.getDirector() + " and it's genre is " + movie.getGenre()); + i++; + } + } + + public static void getAvailableGames() { + System.out.println("Here is list of available Games for rent: "); + int i = 1; + for (Game game : gameList) { + if (game.isAvailableForRent()) + System.out.println( + i + ". " + game.getTitle() + " by " + game.getPublisher() + " and it's genre is " + game.getGenre()); + i++; + } + } + + public static void getAvailableBooks() { + System.out.println("Here is list of available Books for rent: "); + int i = 1; + for (Book book : bookList) { + if (book.isAvailableForRent()) + System.out.println( + i + ". " + book.getTitle() + " by " + book.getAuthor() + " and it's genre is " + book.getGenre()); + i++; + } + } + + public static void rentMovie(Movie movie, Customer customer) { + String id = Long.toString(movie.getId()) + Long.toString(customer.getId()); + long castid = Long.parseLong(id); + if (movie.isAvailableForRent()) { + rentalList.add(new Rental(movie, customer, castid)); + System.out.println(movie.getTitle() + " rented"); + } + else{ + System.out.println("this movie \"" + movie.getTitle() +"\" has been rented by another one and it's not available"); + } + } + + public static void returnMovie(Rental rental) { + Movie tempMovie = rental.getMovie(); + tempMovie.isAvailableForRent(); + } + + public static void rentBook(Book book, Customer customer) { + String id = Long.toString(book.getId()) + Long.toString(customer.getId()); + long castid = Long.parseLong(id); + if (book.isAvailableForRent()) { + Rental rental = new Rental(book, customer, castid); + rentalList.add(rental); + customer.addRent(rental); + System.out.println(book.getTitle() + " rented"); + } + else{ + System.out.println("this book \"" + book.getTitle() +"\" has been rented by another one and it's not available"); + } + } + + public static void returnBook(Rental rental) { + Book tempBook = rental.getBook(); + tempBook.isAvailableForRent(); + } + + public static void rentGame(Game game, Customer customer) { + String id = Long.toString(game.getId()) + Long.toString(customer.getId()); + long castid = Long.parseLong(id); + if (game.isAvailableForRent()) { + rentalList.add(new Rental(game, customer, castid)); + System.out.println(game.getTitle() + " rented"); + } + else{ + System.out.println("this game \""+game.getTitle() + "\" has been rented by another one and it's not available"); + } + } + + public static void returnGame(Rental rental) { + Game tempGame = rental.getGame(); + tempGame.isAvailableForRent(); + } + + public static Customer getCustomerById(long id) { + Customer tempCustomer = null; + Boolean isExisted = false; + for (Customer temp : memberC) { + if (temp.getId() == id) { + tempCustomer = temp; + isExisted = true; + } + } + if (!isExisted) { + System.out.println("we don't have any user with this id"); + } else { + System.out.println("user name is " + tempCustomer.getName()); + System.out.println("user email is " + tempCustomer.getEmail()); + System.out.println("user phone is " + tempCustomer.getPhone()); + tempCustomer.getRentals(); + } + return tempCustomer; + } + + public static Movie getMovieById(long id) { + Movie tempMovie = null; + Boolean isExisted = false; + for (Movie temp : movieList) { + if (temp.getId() == id) { + tempMovie = temp; + isExisted = true; + } + } + if (!isExisted) { + System.out.println("we don't have any movie with this id"); + } else { + System.out.println("movie title is " + tempMovie.getTitle()); + System.out.println("movie director is " + tempMovie.getDirector()); + System.out.println("movie genre is " + tempMovie.getGenre()); + System.out.println("movie cast is " + tempMovie.getCast()); + } + return tempMovie; + } + +} diff --git a/RentalProject/RentalProject/src/test/TestYourFork.json b/RentalProject/RentalProject/src/test/TestYourFork.json new file mode 100644 index 0000000..4ae1770 --- /dev/null +++ b/RentalProject/RentalProject/src/test/TestYourFork.json @@ -0,0 +1,301 @@ +{ + "customers": [ + { + "name": "John Smith", + "email": "johnsmith@example.com", + "phone": "1234567890", + "address": "123 Main Street", + "id": 1 + }, + { + "name": "Emily Johnson", + "email": "emilyjohnson@example.com", + "phone": "9876543210", + "address": "456 Oak Avenue", + "id": 2 + }, + { + "name": "Michael Brown", + "email": "michaelbrown@example.com", + "phone": "5555555555", + "address": "789 Elm Street", + "id": 3 + } + ], + "books": [ + { + "publisher": "Penguin Books", + "availableForRent": false, + "title": "The Secret Garden", + "genre": "Fiction", + "releaseDate": "Mar 15, 2022, 12:00:00 AM", + "rentalFee": 0.0, + "id": 1 + }, + { + "publisher": "HarperCollins", + "availableForRent": false, + "title": "The Alchemist", + "genre": "Fantasy", + "releaseDate": "Jul 1, 2021, 12:00:00 AM", + "rentalFee": 0.0, + "id": 2 + }, + { + "publisher": "Thomas Egerton", + "availableForRent": false, + "title": "Pride and Prejudice", + "genre": "Romance", + "releaseDate": "Jan 28, 1813, 12:00:00 AM", + "rentalFee": 0.0, + "id": 3 + }, + { + "publisher": "J. B. Lippincott \u0026 Co.", + "availableForRent": false, + "title": "To Kill a Mockingbird", + "genre": "Classic", + "releaseDate": "Jul 11, 1960, 12:00:00 AM", + "rentalFee": 0.0, + "id": 4 + }, + { + "publisher": "Secker \u0026 Warburg", + "availableForRent": false, + "title": "1984", + "genre": "Dystopian", + "releaseDate": "Jun 8, 1949, 12:00:00 AM", + "rentalFee": 0.0, + "id": 5 + }, + { + "publisher": "Charles Scribner\u0027s Sons", + "availableForRent": false, + "title": "The Great Gatsby", + "genre": "Fiction", + "releaseDate": "Apr 10, 1925, 12:00:00 AM", + "rentalFee": 0.0, + "id": 6 + }, + { + "publisher": "Bloomsbury Publishing", + "availableForRent": false, + "title": "Harry Potter and the Philosopher\u0027s Stone", + "genre": "Fantasy", + "releaseDate": "Jun 26, 1997, 12:00:00 AM", + "rentalFee": 0.0, + "id": 7 + }, + { + "publisher": "George Allen \u0026 Unwin", + "availableForRent": false, + "title": "The Hobbit", + "genre": "Fantasy", + "releaseDate": "Sep 21, 1937, 12:00:00 AM", + "rentalFee": 0.0, + "id": 8 + }, + { + "publisher": "Little, Brown and Company", + "availableForRent": false, + "title": "The Catcher in the Rye", + "genre": "Coming-of-age", + "releaseDate": "Jul 16, 1951, 12:00:00 AM", + "rentalFee": 0.0, + "id": 9 + }, + { + "publisher": "Geoffrey Bles", + "availableForRent": false, + "title": "The Chronicles of Narnia: The Lion, the Witch, and the Wardrobe", + "genre": "Fantasy", + "releaseDate": "Oct 16, 1950, 12:00:00 AM", + "rentalFee": 0.0, + "id": 10 + } + ], + "games": [ + { + "availableForRent": false, + "title": "The Legend of Zelda: Breath of the Wild", + "genre": "Action-Adventure", + "releaseDate": "Mar 3, 2017, 12:00:00 AM", + "rentalFee": 0.0, + "id": 1 + }, + { + "availableForRent": false, + "title": "Red Dead Redemption 2", + "genre": "Action-Adventure", + "releaseDate": "Oct 26, 2018, 12:00:00 AM", + "rentalFee": 0.0, + "id": 2 + }, + { + "availableForRent": false, + "title": "The Witcher 3: Wild Hunt", + "genre": "Action-RPG", + "releaseDate": "May 19, 2015, 12:00:00 AM", + "rentalFee": 0.0, + "id": 3 + }, + { + "availableForRent": false, + "title": "Super Mario Odyssey", + "genre": "Platformer", + "releaseDate": "Oct 27, 2017, 12:00:00 AM", + "rentalFee": 0.0, + "id": 4 + }, + { + "availableForRent": false, + "title": "God of War (2018)", + "genre": "Action-Adventure", + "releaseDate": "Apr 20, 2018, 12:00:00 AM", + "rentalFee": 0.0, + "id": 5 + }, + { + "availableForRent": false, + "title": "Grand Theft Auto V", + "genre": "Action-Adventure", + "releaseDate": "Sep 17, 2013, 12:00:00 AM", + "rentalFee": 0.0, + "id": 6 + }, + { + "availableForRent": false, + "title": "Minecraft", + "genre": "Sandbox", + "releaseDate": "Nov 18, 2011, 12:00:00 AM", + "rentalFee": 0.0, + "id": 7 + }, + { + "availableForRent": false, + "title": "The Last of Us Part II", + "genre": "Action-Adventure", + "releaseDate": "Jun 19, 2020, 12:00:00 AM", + "rentalFee": 0.0, + "id": 8 + }, + { + "availableForRent": false, + "title": "Fallout 4", + "genre": "Action-RPG", + "releaseDate": "Nov 10, 2015, 12:00:00 AM", + "rentalFee": 0.0, + "id": 9 + }, + { + "availableForRent": false, + "title": "Assassin\u0027s Creed Valhalla", + "genre": "Action-Adventure", + "releaseDate": "Nov 10, 2020, 12:00:00 AM", + "rentalFee": 0.0, + "id": 10 + } + ], + "movies": [ + { + "director": "Christopher Nolan", + "cast": "Leonardo DiCaprio, Joseph Gordon-Levitt", + "availableForRent": false, + "title": "Inception", + "genre": "Sci-Fi", + "releaseDate": "Jul 16, 2010, 12:00:00 AM", + "rentalFee": 0.0, + "id": 1 + }, + { + "director": "Frank Darabont", + "cast": "Tim Robbins, Morgan Freeman", + "availableForRent": false, + "title": "The Shawshank Redemption", + "genre": "Drama", + "releaseDate": "Sep 23, 1994, 12:00:00 AM", + "rentalFee": 0.0, + "id": 2 + }, + { + "director": "Christopher Nolan", + "cast": "Christian Bale, Heath Ledger", + "availableForRent": false, + "title": "The Dark Knight", + "genre": "Action", + "releaseDate": "Jul 18, 2008, 12:00:00 AM", + "rentalFee": 0.0, + "id": 3 + }, + { + "director": "Quentin Tarantino", + "cast": "John Travolta, Uma Thurman", + "availableForRent": false, + "title": "Pulp Fiction", + "genre": "Crime", + "releaseDate": "Oct 14, 1994, 12:00:00 AM", + "rentalFee": 0.0, + "id": 4 + }, + { + "director": "Francis Ford Coppola", + "cast": "Marlon Brando, Al Pacino", + "availableForRent": false, + "title": "The Godfather", + "genre": "Crime", + "releaseDate": "Mar 24, 1972, 12:00:00 AM", + "rentalFee": 0.0, + "id": 5 + }, + { + "director": "David Fincher", + "cast": "Brad Pitt, Edward Norton", + "availableForRent": false, + "title": "Fight Club", + "genre": "Drama", + "releaseDate": "Oct 15, 1999, 12:00:00 AM", + "rentalFee": 0.0, + "id": 6 + }, + { + "director": "Lana Wachowski, Lilly Wachowski", + "cast": "Keanu Reeves, Laurence Fishburne", + "availableForRent": false, + "title": "The Matrix", + "genre": "Sci-Fi", + "releaseDate": "Mar 31, 1999, 12:00:00 AM", + "rentalFee": 0.0, + "id": 7 + }, + { + "director": "Robert Zemeckis", + "cast": "Tom Hanks, Robin Wright", + "availableForRent": false, + "title": "Forrest Gump", + "genre": "Drama", + "releaseDate": "Jul 6, 1994, 12:00:00 AM", + "rentalFee": 0.0, + "id": 8 + }, + { + "director": "Peter Jackson", + "cast": "Elijah Wood, Ian McKellen", + "availableForRent": false, + "title": "The Lord of the Rings: The Fellowship of the Ring", + "genre": "Fantasy", + "releaseDate": "Dec 19, 2001, 12:00:00 AM", + "rentalFee": 0.0, + "id": 9 + }, + { + "director": "Joss Whedon", + "cast": "Robert Downey Jr., Chris Evans", + "availableForRent": false, + "title": "The Avengers", + "genre": "Action", + "releaseDate": "Apr 11, 2012, 12:00:00 AM", + "rentalFee": 0.0, + "id": 10 + } + ] +} \ No newline at end of file diff --git a/RentalProject/RentalProject/target/classes/AllModules.class b/RentalProject/RentalProject/target/classes/AllModules.class new file mode 100644 index 0000000000000000000000000000000000000000..4114bd6545cdbcea6e1e20202da46cea494035a8 GIT binary patch literal 2051 zcmaKsTTdEM5XWZ$LFif(3tmz1(gIeg_FmLPP1+Z1o7(uk;D)YU*k)Nw{8nw!rb!?A z0s5hu{^#tn!uA{=ID2N!%zu98GW_}b>o*Y{&_RY`6i-n?rwK}GG<|7Y8Fky}b?Wb0 zmuB13D7kO-EbmaGc%^!trb$YtD5KLI(lyE)+4iY(F|f_PM(OsT?>Sx5#XR2>LIcmT z>qo9@TsN)0*Wm2CI%PR^qUAWB`|O#~DJMJ~qiYJ!J)QFGNp_tp%XiJ`G|#S-YxX?D z=5l9Nr)PKr*VL#iE4SY~34j`h4ULNOm}6kvw*CfCVtqxPf69m=U{xOQK>&-0#EEkO z+HBM6nQsT(mg#;pS~fhnrqed;bHlaR4x9<^lZAci&6`8UHuR3^4floBxk^=57J=*X zmB^{+{V}=uid3z7u2Er}@%qbXlR)_N^0nUdF=v5V3co~zx3W7@t`5<;E&G&Sh zba;;}9R#bSgIJbMgIZiMv`Z@Nn>Ub#_%OVz03SxPdp-)452{yVkw3lI{M?<>^ z8x0!TD^Np|QxfAU6zlkET&MPvv~QwB2_r9a@iInE=J^_}a& zC~8?;CtvRWr|Q3^QPdnQhp2m)J(i-*Mo~AFs81mBRE|0uMXdt0rZ`pqp^u{GsTiU@ s!|b^fwGc(!R-(Ru$V)kDA&R;S)I9~N--Dy5^RyD8zQU}5+lbNrKXWi+IRF3v literal 0 HcmV?d00001 diff --git a/RentalProject/RentalProject/target/classes/Book.class b/RentalProject/RentalProject/target/classes/Book.class new file mode 100644 index 0000000000000000000000000000000000000000..df2636c2d9be0c95bdb5ca5ea6e71040a8512f7c GIT binary patch literal 1043 zcmbVL+int36kP{qh5|ziw8dgY>m8;l&jxK$B_uY)nAY^6i4Q}20!ODaW*Gb%|G)=L zBql!i0e+Nm?Ey6wd@&@m*POF2Ypp$e|MB%3fXCP^AcJfUmJ1t>g7qxX=L*gv6PjdC z;bF7?+JEP_13w(LkCNDg!_L1>CW#5!T|d#C?m_D~j}_!|D7YxXW#cDN^oEW7NivFJ zh3aA#saSQfCh7UNlR;p{BOS|W#YGkC3T09;fjqI?(=D zi&K;|oB78(YLBVR4|ZC}h=2EnS>+Gj+12^YX+lqxJdv2 literal 0 HcmV?d00001 diff --git a/RentalProject/RentalProject/target/classes/Customer.class b/RentalProject/RentalProject/target/classes/Customer.class new file mode 100644 index 0000000000000000000000000000000000000000..46ee16e27a1957674a804bdeef9a2f2dee1afe4d GIT binary patch literal 1355 zcmbVL+iDY06kR9DWSVr+rcE17ZPlvPWO|AB3$2AxDi}f)D+M2?&5%w>CNh}_evi+B zf}x<`2l!Fq+GmnhlX;TBIs2^awJ&S$`SttzPXN#HEQ^s!0mPgyJX=qN(u?Dp`dCet|%0AhF<8k zsyjj8e5`xjFpC8wg>covHC$(q!1Y6?)n!XjMcQ9nHx)7mUekBNUciDEM*iNaztPOi zZ93M=%1y&wV*=}KEtyfm~b zi_T)ik_J-Rk`@elRv0TPxJqwf8um97KhsD+N=a*QUZ;yf8-sL;0oTsS{5}R`^UDai z6iZ%@CFe%TOR?mQSaN=pyc|oe#*z!8to4IzUm6P@NB0k?>gOeWHm^{{T1?*I57n literal 0 HcmV?d00001 diff --git a/RentalProject/RentalProject/target/classes/Game.class b/RentalProject/RentalProject/target/classes/Game.class new file mode 100644 index 0000000000000000000000000000000000000000..9137aa34c7df5d4287c70cce757db65d7bae53d7 GIT binary patch literal 1047 zcmbVL%Wl(95Ir~XBM+xd(l#`d@O~sNkTnWaLPSAS6+$iQq7naanUJmc#*Gv}PKfBgLR9l#T87mz{Lh2_D9qhP&=^-#fiY(^&D zQFzqcdl$S9+F>vnv=8FQj0T;5olIjBw!1;BJKf#ZVIDc;T@*YN;j!`aV5k*xXJHV( z9Y>r|P4^MZiicGJYW;7(_;%7l&4SY9=&sPc(NF?AXLoY!CD(Vk|~F z)WJlHSCllL`NutKkEkpNdz!CRS0Q6gnCucc(DAEt2iKdeG+zZzihi3%ie~aOWm>k` zqHSvv9jD(}%_GrVI2cc(W8E`CJugxo%BO%ETt|imGP+%z(X$7?(s8!gu@@%Sok<_#yn%IW-g-&pr?UHN1w+?Na_7#Sd+t5=%>4TO<0pWZI4B~6Y#x>a8##sQrT4+>23|Psz8zlb zkx|IK@I&7mDP-H7K>;f$!a7=5K+8{Y(4q1Io(&rIZp<3jwAhC2$SNC(=x);-Sge1XCNoV&UNG4 z$G-3^2$g4|KUx$g!{@bW`AqaO@&NHp*|}SyX?&)F+;iXzctE?!(??`k0oZZBL%Dl1 z-&6}D)%kf$xNZW#rva#h%;iYC^u&8Obx?Gd}MCRdBQ zc*0G^p0E?fJMt~qT|8lE#h!2!h7a+GRv31fElAt_hQ=p48B$2b0M_GnNokvfTD(zs zjNLhy-{l6J|FQ&brh=cOg3HU`%~bGHv{O1)m%*)6a0l)jyqLNEd5QLJDtIr>+W!Mr Cgp}q0 literal 0 HcmV?d00001 diff --git a/RentalProject/RentalProject/target/classes/Main$1.class b/RentalProject/RentalProject/target/classes/Main$1.class new file mode 100644 index 0000000000000000000000000000000000000000..58e23071a2fd900f539e038ae0c53a8201715e7b GIT binary patch literal 455 zcmah_O-}+b5PgM(g%w3X@#Cb42k_vAGe}~HMw5jLgo~%L)TLTlv+bJrvpku2@CW## zjI-d~Njh)lbzb{2-#?#U0IqNnpn#$euZ9xJ3}>-fg^4kV5@BME4pZ@{MC`)p+l!c* zXQ3I&eW|4zFcjOJnU4xFBQEuMm%$sFgM|y54 zEkh;R$a@UciA*$iSxS;_^skqGbgk6LEHWi*Z$SEBVzM+Aw=(~;nm>E_#9ui%y3w&R zR_bIV+|n$3?33GkpoSI>sa{dd&}u(Kxgu0tC*j1Ur08{KWO6L5yEE1?)b6zw=}>WN zg~cg+T45fH4lR+eN>xa>W-dO!-iat6pqyWWsx8X3%>dyxbtUXjE})LxHSVE7=%I-N P9IcrqjtK)&`Ggd|zrA8C literal 0 HcmV?d00001 diff --git a/RentalProject/RentalProject/target/classes/Main.class b/RentalProject/RentalProject/target/classes/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..ecb34de5a9dad5c0cbc59ca420c9d3d403592790 GIT binary patch literal 3172 zcma)8+jA4w9sbT*(n`yMiF^T>Kuj)RV~l_V5+o=E$M}L|sBLITowRFtZLeAFI=kxt zNt;V^?fsVYl9t|*)=k>ZG<^_lnP%uTGwJlPe?Z^L^f`|iCgeM-T`a|BrW(!e@BGd= z-}!#mv;X?&ukQjlfjMbf>{X!QimL`UkmYYBASxzt!c&1S;rm=wwhOO-yHsTHySsiU? z7ie2!v4FZLx7rTTdg^c?FJf8FT(S48icW#{id)Ukx$c~8=I4CZ$q(_Np+g##6UfHM zCoJ0>H;oz7OJj?`#6V%{jBk4Wlw;ZMtl>?Kn@(WZ-2=Akn9-naQZzX2xzZm~zE_zF zOh1^K^MJgZD@qG?=-7!Kf%L5BR!4b&z~RUd^lROi;_Uz$k?WBxs@Nr<9kcDS zJF{e)zJ^}x*3pkW0y;?zEct<3rB4Jl#mtrh%g!J3JmXTy@&nS^i+w8g>$o2e#Bpn0 z!vGUY#%yFw4hLyae3E4Fkd8x=L7KacyY6|?+KZx&!#F~v6_}n8xSl{~6Qz+zUtEWy z__T^+I*wx?j(5l?UP6!08~&Jik))WykH{T^I!<6nAmN1S_87Y%@#(G+E|8Qo4CADZ z63PNe(j1uykw%j&A^Br?KZ9`<6FMewMqph%mnO)YQBHfzED1w@^^~MgEX59B7RMl| zSWsgj6AKCHr!VOEV(h0OqiXsprpZr=8VsD2984Xvn2U~-GvSd^XgX4Zg#{Job=b1z zH^enkPbu11v0b029dLBG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%x-JF*zi1tZnboy{%R|O_+mObU@=s&rDyY49m9Kv}|*# zZTg+lIu*Tz<7gHSb>9fg`r0=rzmc26^BdkAW#5^j@+E=Sd9M=+0*bt( zCA-cFm1MijgjSQ)O_G!BCT_t=G9j8vGNI}v+3iG%!d={3QtdEGH`o6P?=zDO>3~2v ztR@r|xMFhU)0N4MmEcEcEy4TbDbjQP?q62QPYs&j(gv}w RzNosiFPH2~B)5}^{%=FFw)6l1 literal 0 HcmV?d00001 diff --git a/RentalProject/RentalProject/target/classes/Rental.class b/RentalProject/RentalProject/target/classes/Rental.class new file mode 100644 index 0000000000000000000000000000000000000000..daf28bca303c2033e5bec05fc976a12b1d81c57f GIT binary patch literal 1828 zcma)7YflqF6g|_&7RvH&DNhT6QVLQP6%_=em6t_~8WKNl%ZdwqBxOrt`~m(Nqb350 zCjJ2bj^B-EW*3T^Z2}+W&dj~%-ZSUkEx-T%_yynzwxb9j7(qx!7@9!WfpKhPN=9Wr zvr{-Qi?)EaXjLqGNg$Y-+HFM(S|f<+XoF7QE3;x7C4q3cdTf~jk^HvYEXcSH9i8YB zXeri@>}uJp2}JW*cdsIPbo3%75U}uSALG}kPtW}CxgRuaG%2PeQm zk8tHIau<+;t1M?kSx$tqoJ3_gWy*3MXm#+lxXtwrPahHF2}q{TAkxz(h@@vu(4HPU zL3jEm;&0E8I6?n6mEbPdL1%U%3fDHb7IC<0`cyY}gfB;4v0_z!5Ka(ignQUr%Q! zE>|A*f~S4KOIY>+k9xrwU+@Z^UVsDKIdAU%?0NH?FL)K%3vffQesAS@UvSPBJmCc| z_=2Bd&8@t|-pIk$32{(C&Gq{N@mHfHF&FOduE_aezQJB!GJcR0vyQf|y{C#pNY=Bo8JtapolwQ48+c zx>l`Vt=;L~iY;Jht*u?Pduwa=eY5*stxNxN-e!-JMrW8fNk#($)=+wIriod4us0sxDUv}{ zqsG9=Cc>DbP~0gh6hcmN#i->(t=_1;CZ3R(bhKN<;dv%%#oLmEO^bFZ7NE{Ry@>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