Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class Entity {
- private int id;
- public Entity() {}
- public Entity(int id);
- public int getId();
- public void setId(int id);
- }
- // -----------------------------------------------------------------------------------------------------------------------------
- public class Book extends Entity {
- private String name;
- private String author;
- private String genre;
- private int amount; /* кол-во экземпляров */
- private String information;
- public Book() {}
- public Book(int id, String name, String author, String genreID, int amount, String information);
- /* sets & gets */
- }
- //-------------------------------------------------------------------------------------------------------------------------------
- public class Order extends Entity {
- private int idorder;
- private String username;
- private int idbook;
- private int status; /* возвращена или забронированa */
- private String name;
- private String author;
- private String information;
- private String date;
- private String genre;
- public Order() {
- }
- /* sets & gets */
- }
- //--------------------------------------------------------------------------------------------------------------------------------
- public class User extends Entity {
- private String username;
- private String email;
- private String phone;
- private String password;
- public User() {}
- /* sets & gets */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement