What is the wrong with called opject in java code : I'm creating a menu based java code and when I create a new object in the main class show me error.


>variable admin has not been initialized
>incompatible string cannot convert to double.

here is the Admin class


   `public class Admin extends User{
    private String officNo;
    private String positon;` 

    public Admin(String username, String pass, String officeNo, String  postion) {
        super(username, pass);
    }


    public void addProduct(Product p){
         Store.products.add(p);


the product class

      public class Product {
        private String name;
        private String ID;
        private double price;
        private String seller;
    
    public Product(String name, String id, double price, String sell){
        
    }


The main class:
     
     public static void main(String[] args) {
     
      
        Admin admin;

         Scanner inter = new Scanner(System.in);
        System.out.println("Welcome to our Online Store\n\n if you are an admin enter 1 if user enter 2");
        int sw1 = inter.nextInt();
             switch(sw1){
        case 1:
             System.out.println("choose one of the option below: \n"
                     + "(1) add a new product to the store\n" +
                       "(2) delete one of the products\n" +
                       "(3) update one of the product attributes\n" +
                       "(4) search if a certain product exits using its ID\n" +
                       "(5) show the list of products\n"+
                       "(6) exit" );
             
             int sw2 = inter.nextInt();
             switch(sw2){
                 case 1:
                    System.out.println("Enter product name: " );
                    String name=inter.next();
                    System.out.println("Enter product ID: " );
                    String id=inter.next();
                    System.out.println("Enter product price: " );
                    String price=inter.next();
                    System.out.println("Enter product seller: " );
                    String seller=inter.next();
                    
                   admin.addProduct(new Product(name,id,price,seller);
                    break; 

the error comes in this line

      admin.addProduct(new Product(name,id,price,seller);


please any one helep