1. Engineering
  2. Computer Science
  3. lab description use nested loops to print out the triangle...

Question: lab description use nested loops to print out the triangle...

Question details

Lab Description: Use nested loops to print out the triangle letter pattern show below. Sample Data 3 A 7 X 1 R 5 T Files Needed TriangleTwo.java TriangleTwoRunner.java Sample Qutput: AALA algorithm help output- loop 1 to sizoe loop jsize down to KXXX output = output + letter output = output +import static java.lang.System.* public class TriangleTwo private int size; private String letter; public TriangleTwo () public TriangleTwo String let, int sz) public void setTriangle(int count, String let) public String getLetter() return public String toString() String output- return output+Inimport java.util.Scanner; import static java.lang.System.* public class TriangleTwoRunner public static void main( String args) Scanner keyboard - new Scanner (System.in); String choice- dot out.print (Enter the size of the triangle int bigkeyboard.nextInt ( out.print ( Enter a letter) String value - keyboard.nexto: //instantiate a TriangleTwo object TriangleTwo tw-new TriangleTwo ( value, big ) /Icall the toString method to print the triangle System.out.println( tw )i System.out.print(Do you want to enter more data? )hihei choiev equaiati Ichoice.equalaty-))i while(choice.equals(Y)choice.equals(y)

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution