Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

PartA: Draw Triangles The first part of your assignment is to write a program that produces two triangles that appear side by side as below;

image text in transcribedimage text in transcribed

PartA: Draw Triangles The first part of your assignment is to write a program that produces two triangles that appear side by side as below; (NO SPACE between triangles. i.e., 10 characters in each row) Starter Code - Use the "pattern table" to complete 4 for inner loops in the starter code PartB: Modify programs using parameters Now, you will update your ParameterArt.java to produce the same output but with parameters. - Your main will only have a for loop that contains function calls and a println statement to change the line. See the sample code below. - You will then add - method to write spaces where the number of spaces is parameterized - methods to write stars where the number of stars is parameterized - Include comments - a comment header at the beginning of your program with basic information and a title of the assignment as we learned from Notes: println=_practice and Escape Sequence - a comment at the very bottom that shows the output Sample Code public class ParameterArt \{ public static final int TOTAL_ROwS =5; public static void main(String[] args) \{ for (int row =1; row \& = TOTAL_ROwS; row++) \{ // writeSpaces() method cal1 with parameter // writestars() method call with parameter // writespaces() method call with parameter // writeStars() method call with parameter // go to next line System.out.println(); \} ///end of main //writespaces() method definition here... //writestars() method definition here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions