Learning Objectives:

• understand when to use the different

print statements

• create a variable and assign it a value

• use Scanner to read in user input

• print the value of a variable using

printf




Output:

US state: Texas

Capital: Austin

The capital of Texas is Austin

Description:

Copy and paste the code below:

/*******************************************************

* Name:

* Assignment: A01

*******************************************************/


public class A01{


public static void main(String[] args){

// part1

System.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 a

code segment. Then you read in two Strings and print a statement based on the user input.


Part1:

The code segment provided includes

three print statements that produce

the following output:


Change the code segment so that it

produces the following output:


Hint: you will need to change the number of

statements


Part2:

• Prompt the user to enter a state

• Read in the user response and assign

it to a String variable named state

Hint: before you can assign a value to the

variable state it needs to be declared

• Prompt the user to enter the name of

the capital

• Read in the user response and assign

it to a String variable named capital.

• Use printf and format specifiers to

print the following message:

The capital of state is capital

where you substitute state and capital with

the 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 to

separate the prompt from the user input). The output should use a single empty line to

separate the frog displayed in part1 from the output created in part2.

Answers

Answer 1

Answer:

take out the cord than put it back in than it shall work


Related Questions

translate ¨friends¨ into spanish

Answers

Friends to Spanish is Amigos

Answer: I hope this is helpful

Explanation:

Friends in Spanish is Amigo- masculine aka male ,noun.
Friend in Spanish is Amiga- feminine aka Female , noun

Friends- trusted and caring person

If you are going to build a custom fast PC for gaming and you need a lot of storage for big video files and videos, but you have a low budget, what storage device(s) option you are going to consider? Why?

Answers

Answer:

Cheap and efficient PC's for two drives

Explanation:

Buying a expensive PC usually runs slower

What is the name of the table tools contextual tab that appears once you insert a table? Transform Design Outline Charts.

Answers

Answer: B.) Design

Explanation: just took it

Answer:

b

Explanation:

__________ is a procedure that allows communicating parties to verify that received or stored messages are authentic.

Answers

Answer:

Message authentication

Explanation:

Which would a student most likely do in a digital laboratory? conduct an experiment in chemistry take continuing education classes in chemistry look for an out-of-print book about chemistry watch an instructional video about chemistry.

Answers

Answer:

conduct an experiment in chemistry

Explanation:

A digital laboratory is an interactive online tool, where students are asked to mimic an experiment.

Answer:

"conduct an experiment in chemistry"

Explanation:

A digital laboratory is an online tool used to conduct chemistry experiments when, say, you are at home or the tools needed are dangerous. It also helps to make sure you have exact results since it is computerized.

Have a nice day!

     I hope this is what you are looking for, but if not - comment! I will edit and update my answer accordingly. (ノ^∇^)

- Heather

Question about microscope ​

Answers

Answer:

1.  c. diaphragm

2.  a. ocular lens

3.  b. fine adjustment knob

4.  c. course adjustment knob

5.  d. nosepiece

6.  a. simple light microscope

7.  d. A, B, and C

8.  a. light switch

Explanation:

Hope this helps.

what is not an example of a changing operating space?

Answers

What is not an example of a changing operating space? A parking garage. Riley is driving down the highway when the road starts curving to the right.

Parking in garage is not an example of a changing operating space.

What is operating space?

When an operating space is said to be "changing," it usually means that the environment around your car is deteriorating or switching from an open to a closed state.

Operational Spaces are the space(s) inside the Facilities from which the Concessionaire shall have the right, privilege, and obligation to continuously and for the duration of the Term operate its concession in accordance with the terms and conditions of this Agreement.

Distractions while driving, such as texting and using a phone, driving dangerously, such as going too fast or following too closely.

Driving when intoxicated. While drinking and driving is not especially high among novices, it produces a disproportionate number of fatal crashes.

Thus, parking garage is the answer.

For more details regarding operating space, visit:

https://brainly.com/question/9339555

#SPJ6

Memory of your familiar old e-mail password may block the recall of your new password. This illustrates

Answers

Answer:

Retroactive Interference

Explanation:

Memory of your familiar old e-mail password may block the recall of your new password, This illustrates a phenomenon known as proactive interference.

Proactive interference occurs when previously learned information interferes with the recall or retrieval of new information.

The memory of the familiar old e-mail password is interfering with the recall of the new password.

The interference happens because the old password is already deeply ingrained in the individual's memory, and when trying to recall the new password, the old password comes to mind automatically and hinders the retrieval of the correct information.

This interference can lead to forgetting or temporarily blocking the recall of the new password.

To learn more on Proactive interference click:

https://brainly.com/question/30320488

#SPJ6

7.4 Lesson Practice (projectstem): what is output if the user is enters 2?​

Answers

Answer:

18

Explanation:

lets go step by step.

the function called tryIt has a value, a variable named "a". this "a" variable will be whatever the user enters when the program says, Enter a number.

ok so if we enter "a" as 2, and b in the function will always be 7, and 2 + 7 equals 9,

and the ans variable (short for answer) will take the result of the function (9) and multiply it by 2,

then the answer is 18

What is a megavirus in computing

Answers

In the lab experiments conducted by Professor Claverie and colleagues, in which they infected fresh-water amoebas, Megavirus was seen to construct large trojan organelles - the "cells within cells" that would produce new viruses to infect other amoebas.

what is pascaline ?

Answers

Pascal's calculator is a mechanical calculator invented by Blaise Pascal in the mid 17th century. Pascal was led to develop a calculator by the laborious arithmetical calculations required by his father's work as the supervisor of taxes in Rouen.

also called Arithmetic Machine, the first calculator or adding machine to be produced in any quantity and actually used. The Pascaline was designed and built by the French mathematician-philosopher

True or false: The Internet and the World Wide Web are not synonymous. The WWW is just one part of the Internet, and its primary use is to correlate and disseminate information. The Internet includes the WWW and also other forms of communication systems such as email.

Answers

True or false: The Internet and the World Wide Web are not synonymous. The WWW is just one part of the Internet, and its primary use is to correlate and disseminate information. The Internet includes the WWW and also other forms of communication systems such as email.

Answer : True

When using ________ access, access to the data starts at the beginning of the file and proceeds through all the records to the end of the file.

Answers

When using sequential access, access to the data starts at the beginning of the file and proceeds through all the records to the end of the file.

what is the difference between registered and certified mail

Answers

Answer:

1. Certified mail provides a receipt for the sender and for an additional fee, will receive a copy of the recipient's signature upon his receipt of the mail.

2. registered mail provides the sender a receipt and detailed records of his mail's location.

Raina remembered when she taught Amara to draw. What happened?

Answers

Sisters is an autobiographical graphic novel written by Raina Telgemeier as a follow-up to her earlier graphic memoir Smile. It details a long summer road trip taken from San Francisco to Colorado by her family and explores the relationship between Raina and her younger sister, Amara.

- BRAINLIEST answerer

To use the Expression Builder to create a calculated field, select the column in the Field row, right-click to display the shortcut menu, and then click ____.

Answers

Answer:

square brackets [ ]

Explanation:

Hope I could help. Good luck with your studies .

what was your first pokemon game


if you have not played one just comment don't answer

Answers

Answer:

FireRed & LeafGreen

Explanation:

so if it's mobile games then Pokémon go
but if it's Nintendo games then probably sword and shield cos you can catch pretty much every Pokémon.

You have been asked to store a file with personal information on it. You need to be sure that only your user account can access the file, even if other user account have been granted permissions or if the disk is stolen. What standard NTFS feature can you use

Answers

Answer:

EFS

Explanation:

principles of Responsible Artificial Intelligence (AI)?

Answers

Answer:

Their principles underscore fairness, transparency and explainability, human-centeredness, and privacy and security.

Explanation:

who has played pokemon red, blue, or yellow on the gameboy

Answers

Answer:

I didn't think this would be an actual question... I did- :3

I have, it gets harder near the end

The ___________ method returns the length of an array.

append

input

add

len​

Answers

Answer:

d

Explanation:

The length() method returns the number of characters present in the string.

can you still receive messages on messenger from a person when you deleted the conversation with them? (But not blocked them)

Answers

yes cause you didn’t block them

PLEASE HELP! WILL MARK AS BRAINLIEST JavaScript can be implemented using the _________ HTML tags in a web page.​

Answers

Answer:

JavaScript can be implemented using JavaScript statements that are placed within the ...  HTML tag

Explanation:

Answer : language

JavaScript is a scripting language, not a HTMLanguage type. It is mainly to do process at background and it needs document.

1- pensamiento sistémico
2- visión oriental y occidental​

Answers

I don't know

Explanation:

what do you mean?

Discuss the importance of an operating system as it relates to computer hardware and software. Provide at least one example of a service that operating systems provide.

Answers

Answer:

An operating system is the most important software that runs on a computer. It manages the computer's memory and processes, as well as all of its software and hardware. It also allows you to communicate with the computer without knowing how to speak the computer's language.

Examples:

1. User Interface.

2. Program Execution.

3. File system manipulation.

4. Input / Output Operations.

5. Communication.

6. Resource Allocation.

7. Error Detection.

8. Accounting.

_______ is a medium-range wireless network. ________ is a medium-range wireless network. Cellular radio LTE UWB Wi-Fi

Answers

Wireless fidelity (Wi-Fi) is known simply as a wired LAN that does not have cables. Wifi is a medium-range wireless network.

WiFi configuration is made of of transmitter with an antenna. It is the wireless access point because it connects to a wired LAN or to satellite dishes that gives an Internet connection.

Wi-Fi is the mostly used type of medium-range wireless communication system.

Medium-range Wi-Fi signal can take about 100 meters and they also not take as far as cellular signals.

Learn more from

https://brainly.com/question/20812811

To break a text string into several lines, which means that the text string continues on the next line, the _____ character should be used.

Answers

Answer:

To break a text string into several lines, which means that the text string continues on the next line, the backslash character should be used.

Michelle wants to define the scope of a software development project for the benefit of her company. How does defining the scope of a

software development project help a company?


A It helps communicate effectively with the client

B. It helps deliver a project as per the client's requirements.

C It helps prepare a legal agreement

D. It helps decide the project budget

Answers

Answer:

im pretty sure its A

Explanation:

it makes more sense

Answer:

It helps deliver a project as per the client’s requirements.

Trust me... I took the test

web browsers save website information in their _________, which helps the site load faster on future visits.

Answers

Answer: cache

Explanation:because I took the quiz

According to the C&M Technology Competitor View, while Accenture leads in Consulting and SI, which are our two major competitors in large deals?

Answers

Even though Accenture leads in Consulting and SI, its major competitors include McKinsey and Bain & Co. Inc.

Accenture is a multinational professional technology service company that provides digital, tactical, strategic, and consulting services for its clients.

Accenture was formerly known as Arthur Anderson LLP. It's regarded as one of the top accounting firms in the world. Some of its major competitors in large deals include McKinsey, Bain & Co. Inc., Boston Consulting Group, Inc.

Read related link on:

https://brainly.com/question/25740331

Other Questions
Based on expectations of the team, of the organization, and of themselves, what do the members of the team often develop? whose responsibility is it to keep ladders in good condition? is there a verdict in the kyle rittenhouse trial yet the interval [2, 4] is divided into n equal subintervals of length delta x. What is delta x (in terms of k and n) When the Johnson family lights candles at 5:00 PM, each candle is 8 inches tall. The height of each candle changes by -3/4 inch for each hour that it burns. How tall will each candle be at 11:00 PM when the Johnsons put the candles out for the night?Each candle will be___inches tall. Find the value for each variable. in order to take notes the primary motor cortex must receive input from the ________ first. in the diagram, angle ACB=65what does angle BCD=-90-180-65-115 solve for x:4x-14=-2x+24 Help help help help help help 1. It's a good idea to see your doctor regularly for ................... .A. a revisionB. a controlC. an investigationD. a check-up Ellie got a new job; the pay structure is described below. How much money will Ellie make in a week where she works 25 hours and has $3500 in sales. Hourly Pay Rate $14.50. Comission 9%. what does the x mean in 24x? what is the highest risk of exposure to hazardous drugs? In this excerpt, only one character, Squealer, is shown to be speaking forhimself through dialogue. Why do you think Orwell chose to include thatcharacter's speech while only summarizing the main points of Napoleon'sand Snowball's speeches? 2x+5y=25 3x-y=12 con metodo de sustitucin Specialized cells that communicate with each other through electrical and chemical signals are called: The Gifts Of Feodor Himkoff Summery A student heated a mixture of iron filings and sulfur strongly. He saw a red glow spread through the mixture as the reaction continued. At the end of the experiment a black solid had been formed. a) Explain what the red glow indicates. b) Give the chemical name of the black solid. c) Write a word equation that and a balanced chemical equation to represent the reaction which has taken place. d) The black solid is a compound. Explain the difference between the mixture of sulfur and iron and the compound formed by the chemical reaction between them.Please answer part a, b, c, and d. If you don't know the answer to all parts but you know the answer to one part then please answer it will still help what led to the creation of the free-soil party?A. To stop immigrants from entering the United StatesB. To promote slavery across the WestC. To stop the spread of slaveryD. To achieve Manifest Destiny