Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.io
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
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