subject

Goal: The campus squirrels are throwing a party! Do not ask. They need you to write a method that will determine whether it will be successfull (returns true) or not (returns false). The decision will be based on int values of the two parameters "squirrels" and "walnuts" representing respectively the number of squirrels attending the party and the numbers of walnuts available to them. The rules for making that determination are detailed below. Variables declarations & initialization: Boolean variable named "result", initialized to false. Steps for the code: First, if less than 1 squirrel attends, then "result" is assigned false. Else, we consider the following conditions: If we have less than, or exactly, 10 squirrels attending: Then: If we have less than 15 walnuts, Then: "result" is set to false. Else: if we have less than, or exactly, 30 walnuts Then: "result" is set to true. Else: "result" is set to false. Else: If less than, or exactly, 30 squirrels are attending Then: If the number of walnuts is more or equal to twice the number of squirrels attending Then: "result" is set to true Else: "result" is set to false Else: If the number of walnuts is equal to 60 plus the number of squirrels attending minus 30 Then: "result" is set to true Else: "result" is set to false

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
question
Computers and Technology, 23.06.2019 03:50
Q-1 which of the following can exist as cloud-based it resources? a. physical serverb. virtual serverc. software programd. network device
Answers: 1
question
Computers and Technology, 23.06.2019 04:40
The narrative structure of the popular movies can be broken down into
Answers: 3
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
You know the right answer?
Goal: The campus squirrels are throwing a party! Do not ask. They need you to write a method that wi...
Questions
question
English, 29.01.2021 20:30
Questions on the website: 13722363