Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Huseen Abo Aita
Added: May 8, 2021 10:26 PM
Views: 501
Tags: no tags
  1.  
  2. package singlatonepattren;
  3.  
  4. import java.sql.*;
  5. import java.time.LocalDate;
  6.  
  7. public class SinglatonePattren {
  8.  
  9.     public static void main(String[] args) throws SQLException, ClassNotFoundException {
  10.         BookDB bookDB1 =BookDB.getInstance();
  11.         bookDB1.ViewAllBooks();
  12.         bookDB1.insert("Book1",444, "Khaled","2021/5/30");
  13.         bookDB1.delete(444);
  14.         bookDB1.update(123,"Book10","Huseen","2021/10/1");
  15.         System.out.println("*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/");
  16.         BookDB bookDB2=BookDB.getInstance();
  17.         bookDB2.ViewAllBooks();
  18.         bookDB2.insert("Book8",2525, "Hosame", "2021/10/2");
  19.         bookDB2.delete(2525);
  20.         bookDB2.update(123, "Book25","Omer", "2021/04/4");
  21.         System.out.println("*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/");
  22.         System.out.println(bookDB1);
  23.         System.out.println(bookDB2);      
  24.     }
  25.    
  26. }
  27.