Hello everyone,

I try to study Jave alone --> Just a new student in it
and I try to Do some Excersice but I faced some problem in it
please help me

DrawingTable class with main () method that have Three private static methods:
draweTable(int size) invoke the another method
Line(int size) is draw a horizontal line acoording to size
Row(int size) draw a row of cells in the table


Enter the size of the table { the size must be between 1 to 10}
2
*-----*-----*
| | |
*-----*-----*
| | |
*-----*-----*


When the users enter number not between 1 to 10, then must print an error message and then terminate.
When the user enters non+numeric value, then your program must also print an error message then terminate..


I do it Like that



Code:
 public static void main(String momo[])
    {
   Scanner m = new Scanner (System.in);

  try{

     System.out.println("Enter the size of the table { the size must be between 1 to 10}");
   int s = m.nextInt();
  
       draweTable(s);
  
  } catch (InputMismatchException e) {
                    System.err.println("Error! You should enter a numeric data");
                 }
    }


 private static void printTable(int size)
    {
      for (int i=0;i<size;i++)   {
         Row(size);
         Line(size);
        }
        Row(size);
    }

     private static void Row(int size)
    {
         for (int i=0;i<size;i++){
           
     
 
             }
          
  

    }
 private static void Line(int size)
    {
     
         for (int i=0;i<size;i++)
         {
            System.out.print();
         }
   

    }