Instructions are included in the pictures to the left, the already started program is within the middle of each picture.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Instructions are included in the pictures to the left, the already started program is within the middle of each picture.

Post by answerhappygod »

Instructions are included in the pictures to the left, thealready started program is within the middle of each picture.Please read the instructions and get the correct output, I'll makesure to like correct responses!
Instructions Are Included In The Pictures To The Left The Already Started Program Is Within The Middle Of Each Picture 1
Instructions Are Included In The Pictures To The Left The Already Started Program Is Within The Middle Of Each Picture 1 (117.07 KiB) Viewed 35 times
Instructions Are Included In The Pictures To The Left The Already Started Program Is Within The Middle Of Each Picture 2
Instructions Are Included In The Pictures To The Left The Already Started Program Is Within The Middle Of Each Picture 2 (110.86 KiB) Viewed 35 times
Nesting Loops in Java m ✓= Ⓡ Nesting Loops Summary In this lab, you add nested loops to a Java program provided. The program should print the letter E. The letter E is printed using asterisks, three across and five down. Note that this program uses System.out.print("*"); to print an asterisk without a new line. Instructions 1. Write the nested loops to control the number of rows and the number of columns that make up the letter E. 2. In the loop body, use a nested if statement to decide when to print an asterisk and when to print a space. The output statements have been written, but you must decide when and where to use them. 3. Execute the program. Observe your output. LetterE.java 1 // LetterE.java - This program prints the letter E with 3 asterisks 2 // across and 5 asterisks down. 3 // Input: None. 4 // Output: Prints the letter E. 5 6 public class LetterE 7 { 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 public static void main(String args[]) { final int NUM_ACROSS = 3; // Number of asterisks to print across. final int NUM_DOWN = 5; // Number of asterisks to print down. int row; // Loop control for row number. int column; // Loop control for column number. // This is the work done in the detailLoop() method // Write a loop to control the number of rows. // Write a loop to control the number of columns // Decide when to print an asterisk in every column. System.out.print(" "); // Decide when to print asterisk in column 1. System.out.print(" "); // Decide when to print a space instead of an asterisk. System.out.print(" "); // Figure out where to place this statement that prints a newline. System.out.println(); X
Nesting m 3 Lad Ⓒ Loops in Java Nesting Loops Instructions 1. Write the nested loops to control the number of rows and the number of columns that make up the letter E. 2. In the loop body, use a nested if statement to decide when to print an asterisk and when to print a space. The output statements have been written, but you must decide when and where to use them. 3. Execute the program. Observe your output. 4. Modify the program to change the number of rows from five to seven and the number of columns from three to five. What does the letter E look like now? Grading YAL. Wh LetterE.java 7 { 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 + DAGOO COLLOLL public static void main(String args[]) { final int NUM_ACROSS = 3; final int NUM_DOWN = 5; int row; // Loop control for row number. int column; // Loop control for column number. // Number of asterisks to print across. // Number of asterisks to print down. // This is the work done in the detailLoop() method // Write a loop to control the number of rows. // Write a loop to control the number of columns // Decide when to print an asterisk in every column. System.out.print(" "); // Decide when to print asterisk in column 1. System.out.print(" "); // Decide when to print a space instead of an asterisk. System.out.print(" "); // Figure out where to place this statement that prints a newline. System.out.println(); // This is the work done in the endOfJob() method System.exit(0); } // End of main() method. 32 33 } // End of LetterE class. 34 Ох
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply