Advertisement
Guest User

Untitled

a guest
Apr 24th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.53 KB | None | 0 0
  1. public abstract class Entity {
  2.     private int id;
  3.  
  4.     public Entity() {}
  5.     public Entity(int id);
  6.     public int getId();
  7.     public void setId(int id);
  8. }
  9.  
  10. // -----------------------------------------------------------------------------------------------------------------------------
  11.  
  12. public class Book extends Entity {
  13.  
  14.     private String name;
  15.     private String author;
  16.     private String genre;
  17.     private int amount;  /* кол-во экземпляров */
  18.     private String information;
  19.  
  20.     public Book() {}
  21.     public Book(int id, String name, String author, String genreID, int amount, String information);
  22.  
  23.    /* sets & gets */
  24.  
  25. }
  26.  
  27. //-------------------------------------------------------------------------------------------------------------------------------
  28.  
  29. public class Order extends Entity {
  30.  
  31.     private int idorder;    
  32.     private String username;
  33.     private int idbook;
  34.    
  35.     private int status; /* возвращена или забронированa */
  36.     private String name;
  37.     private String author;
  38.     private String information;
  39.     private String date;
  40.     private String genre;
  41.  
  42.     public Order() {
  43.     }
  44.  
  45.     /* sets & gets */
  46.  
  47. }
  48.  
  49. //--------------------------------------------------------------------------------------------------------------------------------
  50.  
  51. public class User extends Entity {
  52.  
  53.     private String username;
  54.     private String email;
  55.     private String phone;
  56.     private String password;
  57.  
  58.     public User() {}
  59.     /* sets & gets */
  60.  
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement