I just realized that I need to add a main class in my work, but I don't know what to put inside it.
Here's my code for one of my classes
import java.util.Scanner;
public class rectangle
{
public static void main(String[] args)
{
int width;
int height;
int count = 1;
Scanner scan = new Scanner (System.in);
System.out.println("Please enter the width of the rectangle: ");
width = scan.nextInt();
System.out.println("Please enter the height of the rectangle: ");
height = scan.nextInt();
while (count <= width)
{
if(width < 1 || width > 30)
{
throw new IllegalArgumentException("The numbers must be in range");
}
if(height < 1 || height > 30)
{
throw new IllegalArgumentException("The numbers must be in range");
}
for (int star = 1; star <= height; star++)
{
System.out.print("*");
}
System.out.println();
count++;
}
}
}
Now I don't know what to add to make this work from the main method.