Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started