Question: use draw.io Activity 4: Create a banner with centered text. The banner will have a width of 70 characters and a border of three characters

use draw.iouse draw.io Activity 4: Create a banner with centered text. The banner

Activity 4: Create a banner with centered text. The banner will have a width of 70 characters and a border of three characters on on either side of the centered text. If the text entered is longer than 64 characters, truncate the text. Assume you have basic string tools that can determine the length of a string and get a selected range of characters from a string. Hint: (70 - 6 - String length)/2 will determine the padding cases where the number of characters is even. Sample output: User enters: Sample text. // The line below is used for measurement and is not part of the program! 123456789-123456789-123456789-123456789-123456789-123456789-123456789- Sample text. User enters: A really long string that is longer than the text area and it will get chopped for sure I just know it. //The line below is used for measurement and is not part of the program! 123456789-123456789-123456789-123456789-123456789-123456789-123456789- * *** ** *** ** * *** ** ** ** ** *** ** ** *** * *** * *** ***A really long string that is longer than the text area and it wi*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + User enters: This string has an odd number of characters: 47 //The line below is used for measurement and is not part of the program! 123456789-123456789-123456789-123456789-123456789-123456789-123456789- This string has an odd number of characters: 47 * *** * ** ** * Activity 4: Create a banner with centered text. The banner will have a width of 70 characters and a border of three characters on on either side of the centered text. If the text entered is longer than 64 characters, truncate the text. Assume you have basic string tools that can determine the length of a string and get a selected range of characters from a string. Hint: (70 - 6 - String length)/2 will determine the padding cases where the number of characters is even. Sample output: User enters: Sample text. // The line below is used for measurement and is not part of the program! 123456789-123456789-123456789-123456789-123456789-123456789-123456789- Sample text. User enters: A really long string that is longer than the text area and it will get chopped for sure I just know it. //The line below is used for measurement and is not part of the program! 123456789-123456789-123456789-123456789-123456789-123456789-123456789- * *** ** *** ** * *** ** ** ** ** *** ** ** *** * *** * *** ***A really long string that is longer than the text area and it wi*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + User enters: This string has an odd number of characters: 47 //The line below is used for measurement and is not part of the program! 123456789-123456789-123456789-123456789-123456789-123456789-123456789- This string has an odd number of characters: 47 * *** * ** ** *

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!