Question: JAVA Task 5 (16 pts) Project and main class names: HW3_Rectangles Submit: HW3_Rectangles.java Write a program that reads an integer and displays, using asterisks, a
Task 5 (16 pts) Project and main class names: HW3_Rectangles Submit: HW3_Rectangles.java Write a program that reads an integer and displays, using asterisks, a filled and hollow square, placed next to each other. For example, if the side length is 5, the program should display: You can assume that the user will enter a side length that is at least 2. If user enters a number smaller than 2, and your program has an incorrect behaviour, it is ok. Hint: Using loops, build a string with the pattern for one line (e.g. "*********). Otherwise, you will have to use nested loops Sample run 1 This program will display a full and an empty square given the side length. Enter the side length: 6 Bye Sample run 2 This program will display a full and an empty square given the side length. Enter the side length: 10 Bye
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
