Question: Lab Description Use nested loops to print out the box pattern show below. Files Needed Box.java BoxRunner.java Sample Data: Sample Output algorithm help output loop



Lab Description Use nested loops to print out the box pattern show below. Files Needed Box.java BoxRunner.java Sample Data: Sample Output algorithm help output loop that runs num times loop output += "*" loop k .. output += "#" .. output " " += import static java.lang.System.; public class Box private int size; public Box() size -0 public Box (int count) size -count; public void setsize (int count) size count; public int getsize) return size; public String toString() String output-"" return outputi import java.util.Scanner; import static java.lang.System.* public class BoxRunner public static void main( String args) scanner sc-new Scanner (System.in) System.out.print("Enter the box size" int s-sc.nextInt() Box bxnew Box(s); System.out.println ("The box size is "+bx.getSize() System.out.println() for(int i 1i- ; k--) System.out.print("*" for (int j-1ij
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
