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
What’s bigger 4,000,000 KB or 2.8 GB
Zanzabum

Answer:2.8 GB is bigeer

8 0
4 years ago
Read 2 more answers
If your laptop is not able to connect to your wireless network, which of the
krok68 [10]
The answer is A! Hope this is helpful!
8 0
2 years ago
Read 2 more answers
Which of the following Web 2.0 tools can aid in searches using key words? (1 p
svet-max [94.6K]

Web 2.0 Tools can aid in searches using key words

Explanation:

Web 2.0 Tools can aid in searches using key words .The followings are some tool like face book and you tube and google search that allow users to searches using key words. web 2.0 tools can be used to teach curriculum content, store data, create and edit video, edit photos,etc.,

Web 2.0 tools are easy to use websites designed to encourage creativity, team work, also helps in higher order thinking skills in classroom .The important thing is to teach students to think critically with whatever tools they have in front of them using key words while searching.

3 0
3 years ago
In spreadsheet software, the________________ feature ensures that the results in every cell are accurate for the information cur
nlexa [21]

Answer:

In spreadsheet software, the automatic recalculation feature ensures that the results in every cell are accurate for the information currently entered in the worksheet.

Explanation:

Entering new data in spreadsheets and calculating the changes has been made a lot easier due to the automatic recalculation tool of spreadsheets. One can simply enter a data, organize it and even make modifications with the right calculations every time by this feature. Spreadsheets like excel are programmed to recalculate the formulas after every single change made in the spreadsheets. This capability of spreadsheets has helped a lot to maintain data consisting of huge amounts of complex mathematical formulas.

5 0
4 years ago
Nominal data: are ranked according to some relationship to one another. have constant differences between observations. are sort
WINSTONCH [101]

COMPLETE QUESTION:

Nominal data:

A) are ranked according to some relationship to one another.

B) have constant differences between observations.

C) are sorted into categories according to specified characteristics.

D) are continuous and have a natural zero.

Answer:

C) Are sorted into categories according to specified characteristics.

Explanation:

Nominal data is defined in statistics as that data that are 'named' or 'labelled'. Data values therefore belong to different groups with unique labels with each group associated with specified characteristics.

6 0
3 years ago
Other questions:
  • 3) Write a program named Full_XmasTree using a nested for loop that will generate the exact output. This program MUST use (ONLY)
    6·1 answer
  • Mike wants to build an amplifier. Which technology can he use?
    15·1 answer
  • Which Boolean operator enables you to exclude a search term?
    9·2 answers
  • Worksheet titles and subtitles should be as wordy as possible.<br> a. True<br> b. False
    9·2 answers
  • Help, with gaming unlocked
    12·1 answer
  • Write the Stats method record that takes a test score and records that score in the database. If the score already exists in the
    15·1 answer
  • What does perseverance mean?
    11·2 answers
  • When we add suffix L to a integer it is called as __________​
    12·1 answer
  • What is the difference between a debit card and<br> a smart card?
    15·1 answer
  • 3. List three common vector image file types.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!