1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
natali 33 [55]
3 years ago
7

Write a method takeAwalk which will take an argument saying how many spare minutes you have for your walk (a whole number), and

will print out where you will go using System.out.println. If you have at least 60 minutes for your walk, you will go to the store: print "Store". Otherwise, if you have at least 10 minutes, you will walk around the block: print "Block". Otherwise, print "Nowhere". The method does not return any value. 1
Computers and Technology
1 answer:
lianna [129]3 years ago
8 0

Answer:

public class walk {

       //create the function

public static void takeAwalk(int spare_Minute) {

 //check the condition and print if match

 if(spare_Minute>=60) {

  System.out.println("Store");

 }else if(spare_Minute>=10) {

  System.out.println("Block");

 }else {

  System.out.println("Nowhere");

 }

public static void main(String[] args) {  

 //call the function

 takeAwalk(60);

}

}

Explanation:

Create the class and define the function takeAwalk which takes one parameter of integer type and the function return type is void. It means the function does not return any value.

In the function, take the continuous if-else statement.

syntax:

if(condition){

  statement;

}else if(condition){

   statement;

}else{

  statement;

}

it takes the condition, if the condition is true then execute the statement otherwise program move to the else if() part. if this is also false then the program moves to the else part.

create the main function for testing the program and call the function.

suppose the value pass is 60.

then, program control moves to the function definition and start executing.

if-else statement checks the condition, 60 >= 60 condition match and the program print the message "Store".

You might be interested in
Grandma Ester normally gives you hugs for your birthday - one for every year old you are. When you turned 15, she squished you w
horsena [70]

Answer:

Written in Python

age = int(input("How old are you? "))

for i in range(1,age+1):

     print("**HUG**")

Explanation:

The first line prompts the user for age

age = int(input("How old are you? "))

The next line is an iteration that starts from 1 till the user input

for i in range(1,age+1):

The last line prints "**HUG**" while the iteration is true

     print("**HUG**")

4 0
3 years ago
Help with this pleaseeeeeee​
slavikrds [6]

Answer:

fiber optic because It is thinner than the others in the list

8 0
3 years ago
Select the correct answer.
siniylev [52]

Answer:A

Explanation: J pegs are easily saved and accessed anywhere and show good quality

8 0
3 years ago
When we consider data quality, what are the differences among validity, reliability, and representativeness? How can you know th
MArishka [77]

Answer:

Validity is the degree to which the research measures what it has to measure. High validity = Proper Research Design.

Reliability is the measure to which research measurement techniques are free of error or mistakes. High realiability = Reasearchers know the sample fully understands the question asked.

Representativeness is the extent to which consumers in a study are similar to the larger group of interest. High representativeness = Sample is large and chosen in an unbiased way.

3 0
4 years ago
"When a large data file needs to be processed in ascending or descending order based on a particular field, the most efficient a
Alona [7]

Answer:

Yes

Explanation:

For example, We need to write down the names of student in a school for survey purposes, rather than tell everyone to write their names on a sheet of paper and submit, we can instruct that names be written according to their classes and then written on the class sheets alphabetically.

Logically names will be written according to the classes from Class 1 - 10, then on the class sheet alphabetically from A - Z. its better represented that way for easy understanding and better collation and interpretation of data.

7 0
4 years ago
Other questions:
  • How do all apple phones work?
    7·1 answer
  • To pinpoint an earthquake's location, scientists need information from how many seismometers?
    8·1 answer
  • In which of the following careers must one learn and use programming languages?
    12·1 answer
  • 3. The invention of the transistor was important to the development of computers because it
    5·1 answer
  • A(n) Answer display color uses the least electricity when compared to any other color.
    15·1 answer
  • What typed of google group is best-suited for an online study group?
    7·1 answer
  • You can include up to _____ logical conditions in the and function. (487181)
    12·1 answer
  • The GPS device in an automobile uses which communication channel?
    7·1 answer
  • Imagine that your parents were starting a small business, and they wanted to upgrade their data storage. Would you recommend a f
    11·1 answer
  • What is the best way to share a document that contains many image or audio files.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!