Question: undefined Create a method called heart that accepts an integer named size as a parameter. This method will print out an ascii heart using and

undefined Create a method called heart that accepts an integer named sizeundefined

Create a method called heart that accepts an integer named size as a parameter. This method will print out an ascii heart using and #. The widest part of the heart will have size * 2 #s. Each line underneath that will subtract a #from each side and replace it with a - Each line above that line will subtract a #from each side and subtract 2 #'s from the middle, replacing them all with -. Note the difference between when size is even or odd. It is recommended to create two new methods to create this, one for creating the top half, one for creating the bottom half. You can assume that size will be greater than or equal to 3. heart(6); -------- -****--***+- heart(5); -------- -***--***- ******* heart(4); -#--++- heart(3); ---- --##-- -----##

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!