subject

Learning Objectives:• understand when to use the differentprint statements• create a variable and assign it a value• use Scanner to read in user input• print the value of a variable usingprintfOutput:US state: TexasCapital: AustinThe capital of Texas is AustinDescription:Copy and paste the code below:/ Name:* Assignment: A01/public class A01{public static void main(String[] args){// part1System. out. print("x x x");System. out. print("x o x");System. out. print("x x x");System. out. println();// part2}}Write your name in the comment on top. The red letters in the output are the user inputs. This assignment consists of 2 parts. First you demonstrate your understanding of the different print statements by modifying acode segment. Then you read in two Strings and print a statement based on the user input. Part1:The code segment provided includesthree print statements that producethe following output:Change the code segment so that itproduces the following output:Hint: you will need to change the number ofstatementsPart2:• Prompt the user to enter a state• Read in the user response and assignit to a String variable named stateHint: before you can assign a value to thevariable state it needs to be declared• Prompt the user to enter the name ofthe capital• Read in the user response and assignit to a String variable named capital.• Use printf and format specifiers toprint the following message:The capital of state is capitalwhere you substitute state and capital withthe state and capital entered by the user. Make your output look exactly like the output displayed above. Make sure to read in the input next to the prompt but without touching it (use a blank toseparate the prompt from the user input). The output should use a single empty line toseparate the frog displayed in part1 from the output created in part2.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
*! 20 points! *jeff wants to create a website with interactive and dynamic content. which programming language will he use? a. dhtml b. html c. css d. javascript
Answers: 1
question
Computers and Technology, 23.06.2019 17:20
What is the best assassins creed game?
Answers: 2
question
Computers and Technology, 24.06.2019 21:30
Jenny wants to create an animated short video to add to her website. which software will she use to create this animated video?
Answers: 1
You know the right answer?
Learning Objectives:• understand when to use the differentprint statements• create a variable and as...
Questions
question
Mathematics, 28.02.2021 03:00
question
English, 28.02.2021 03:00
question
Mathematics, 28.02.2021 03:00
Questions on the website: 13722367