Design the required class from the given code and the outputs. [You are not allowed to change the code below] Hint: Number of the border characters for the top and the bottom = 1 + Number of spaces...


#Write your class code here using python
word = "CANCEL"
spaces = 10
border = 'x'
b1 = buttons(word, spaces, border)
print("=======================================================")
b2 = buttons("Notify",3, '!')
print("=======================================================")
b3 = buttons('SAVE PROGRESS', 5, '$')


Design the required class from the given code and the outputs.<br>[You are not allowed to change the code below]<br>Hint:<br>Number of the border characters for the top and the bottom<br>= 1<br>+ Number of spaces between the left side border and the first character<br>of the button name<br>+ Length of the button name<br>+ Number of spaces between the right side border and the last character<br>of the button name<br>+ 1<br>NOTE: Don't count the space or any character from the button<br>representation to solve this problem.<br>

Extracted text: Design the required class from the given code and the outputs. [You are not allowed to change the code below] Hint: Number of the border characters for the top and the bottom = 1 + Number of spaces between the left side border and the first character of the button name + Length of the button name + Number of spaces between the right side border and the last character of the button name + 1 NOTE: Don't count the space or any character from the button representation to solve this problem.
Output:<br>CANCEL Button Specifications:<br>Button name: CANCEL<br>Number of the border characters for the top and the bottom: 28<br>Number of spaces between the left side border and the first character of the button<br>name: 10<br>Number of spaces between the right side border and the last character of the button<br>name: 10<br>Characters representing the borders: x<br>XXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>CANCEL x<br>кххххх<br>Notify Button Specifications:<br>Button name: Notify<br>Number of the border characters for the top and the bottom: 14<br>Number of spaces between the left side border and the first character of the button<br>name: 3<br>Number of spaces between the right side border and the last character of the button<br>name: 3<br>Characters representing the borders: !<br>!!!!

Extracted text: Output: CANCEL Button Specifications: Button name: CANCEL Number of the border characters for the top and the bottom: 28 Number of spaces between the left side border and the first character of the button name: 10 Number of spaces between the right side border and the last character of the button name: 10 Characters representing the borders: x XXXXXXXXXXXXXXXXXXXXXXXXXXXX CANCEL x кххххх Notify Button Specifications: Button name: Notify Number of the border characters for the top and the bottom: 14 Number of spaces between the left side border and the first character of the button name: 3 Number of spaces between the right side border and the last character of the button name: 3 Characters representing the borders: ! !!!!" ! Notify ! SAVE PROGRESS Button Specifications: Button name: SAVE PROGRESS Number of the border characters for the top and the bottom: 25 Number of spaces between the left side border and the first character of the button name: 5 Number of spaces between the right side border and the last character of the button name: 5 Characters representing the borders: $ $$$$$$$$$$$$$$$$$$$$$$$$ $ SAVE PROGRESS $ $$$$$$$$$$$$$$$$$$$$$$$$$
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here