Question: Part 0 4 : Triangle Generator Method Description doTriangle ( Scanner ) Partially provided in template and called by the menu, which provides a Scanner

Part 04: Triangle Generator
Method Description
doTriangle(Scanner) Partially provided in template and called by the menu, which provides a Scanner object.
Remove the placeholder message.
Then implement the following functionality:
Collect the following 3 inputs from the user in this specific order:
Size (base and height) of the triangle
Border character
Interior character
With these inputs, print out a triangle made of the border and interior characters as shown in the examples, with the specific inputted base and height.
Here are some examples of what the program should look like when it runs with several different inputs:
Example 1
Enter size : 5
Enter border : X
Enter interior : O
X
XX
XOX
XOOX
XXXXX
Example 2
Enter size : 8
Enter border : +
Enter interior : -
+
++
+-+
+--+
+---+
+----+
+-----+
++++++++
Example 3
Enter size : 3
Enter border : $
Enter interior : #
$
$$
$$$

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!