Question: Write, compile, and test a class that displays the pattern shown in Figure 1-26. I have tried spacing out the T's in 1-9, even tabbing

Write, compile, and test a class that displays the pattern shown in Figure 1-26.

I have tried spacing out the T's in 1-9, even tabbing them over to line them up properly to get the proper output.

The program runs, but when I click the checkmarks to see if I have done the code properly for the pattern but only get 14%; so I just would like to share my code and ask for feedback please?

My Code:

class Triangle {

public static void main(String[] args) {

// Output of Ts

System.out.println(" T ");

System.out.println("T T T");

System.out.println("TT T TT");

System.out.println("TTTTTTT");

System.out.println("TTTTTTTTT");

System.out.println("TTTTTTTTTTT");

System.out.println("TTTTTTTTTTTTT");

}

}Write, compile, and test a class that displays the pattern shown in

but 10.00 ill 2 3 Study Tools 4 LUM O out of 1 checks passed. Review the results below for more details. 5 Class public static void 11 Output of Ts System.out.print System.out.print System.out.print System.out.print System.out.printl System.out.printl System.out.println 6 tions 5 Checks 7 8 success Tips Test Case Incomplete The Trtangle program displays the correct pattern 9 10 uccess Tips 11 D FOR YOU Input 12 13 Output e Mast out of T TTT TT TTT TTTTTTT ve Feedback TTTTTTTTTTT Results (1) WEST) Show Detail Run Check Submit o LP cenovo Esc FT

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!