Answered step by step
Verified Expert Solution
Link Copied!

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.ioimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions

Question

Discuss why a company might want to repurchase it shares.

Answered: 1 week ago

Question

(a) Let 0 0. Which number is larger? 2 a 22 d a2T a-1/2

Answered: 1 week ago