Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is an Individual Assignment. You must complete this assignment on your own. - Do not collaborate or share code with other students. - Do

image text in transcribedimage text in transcribed

This is an Individual Assignment. You must complete this assignment on your own. - Do not collaborate or share code with other students. - Do not copy and paste code from anywhere. - Especially from Chegg or Course Hero, or Stack Overflow, or from anywhere you found through a Google Search - Students copying or sharing code will be reported to the Dean's office for violating the Academic Integrity Policy and for disciplinary action. - Before you make a serious mistake and risk your grade and enrollment at ASU, please see your instructor for help. - Do not use any resources outside of those provided in the course materials. - Do not use any language features that have not been covered to this point in the course materials. - Do not use any language features that are explicitly forbidden in these instructions. - If you get stuck or need help, please use the help systems provided in this course. Copyright 2021 Arizona State University - This content is protected and may not be shared, uploaded, sold, or distributed in whole or part. Copying any part of these instructions or any part of a solution and sharing online or otherwise in any form is a violation of copyright laws and the ASU Academic Integrity policy. All violations will be prosecuted. Required Skills Inventory - Use variables to name, store, and retrieve values - Use System.out.print to prompt the user for input - Use a Scanner to collect user input - Use loops to get the computer to repeat instructions - Use nested loops to construct an algorithm Problem Description and Given Info Write a java program that will collect the following 4 inputs from the user: 1. width of the box 2. height of the box 3. border character 4. interior character Your program must collect the inputs in the order described above. With these inputs, your program must print out a box made of the border and interior characters, and with the specified height and width. Here are some examples of what the program should look like when it runs with several different inputs: EnterwidthEnterheightEnterborderEnterinterior:XXXXXXXXO0000XXO0000XXO0000XXXXXXXX:7:5:X Example 2 EnterwidthEnterheight:Enterborder:+Enterinterior:++++++++++:43 Example 3 For the given inputs, make sure that your program output looks exactly like the example above (including spelling, capitalization, punctuation, spaces, and decimal points). Hints and Helpful Info - It can help to break this process down into steps. - To print the box, you must print a number of lines of text (specifically height lines of text) - For each line of text that you print, you must print a number of characters (Specifically width characters) - Each character is either a border character or an interior character - You can use a loop to iterate through each line of the box - You can use a nested loop to iterate through each character in this line of the box - You can use a decision statement to decide to print either a border character or an interior character - For example, - if the current line is the first line, then the printed character will be the border character - if the current character is the first character on this line, then the printed character will be the border character - etc. - After each line, you can print a newline character to start the next line

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

More Books

Students also viewed these Databases questions

Question

8. Explain the contact hypothesis.

Answered: 1 week ago

Question

2. Define the grand narrative.

Answered: 1 week ago