Welcome to Westonci.ca, where curiosity meets expertise. Ask any question and receive fast, accurate answers from our knowledgeable community. Join our platform to connect with experts ready to provide precise answers to your questions in various areas. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

the boxstring method contains two loops for for printing a line of - characters, one at the top and one at the bottom. since the code is the same, place it into a separate method printline, and use that method to simplify boxstring.