subject

Consider the following class designed to store weather statistics at a particular date and time: public class WeatherSnapshot
{
private int tempInFahrenheit;
private int humidity; // value of 56 means 56% humidity
private int dewPoint; // in degrees Fahrenheit
private String date; // stores the date as a String
private int time; // in military time, such as 1430 = 2:30 pm
private boolean cloudy; // true if 25% or more of the sky is covered
// constructor not shown, but it initializes all instance variables
// postcondition: returns temperature
public int getTemp()
{
return tempInFahrenheit;
}
// postcondition: returns date
public String getDate()
{
return date;
}
// postcondition: returns true if precipitation is likely; false otherwise
public boolean precipitationLikely()
{
// implementation not shown
}
// other methods not shown
}
Suppose a WeatherSnapshot object named currentWeather has been correctly instantiated in a client class. Which of the following will correctly call the precipitationLikely method?
A. boolean couldRain = precipitationLikely();
B. boolean couldRain = currentWeather. precipitationLikely();
C. boolean couldRain = currentWeather. precipitationLikely(true);
D. double percentChanceOfRain = precipitationLikely();
E. double percentChanceOfRain = currentWeather. precipitationLikely();

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 07:10, anika420
If you want to import a picture into a dtp application, what must you do first? draw an image frame. import text. open the folder containing the file. select get image… from the windows menu.
Answers: 2
image
Computers and Technology, 24.06.2019 08:20, brinks7994
Which type of entity describes a fundamental business aspect of a database? a. linking b. lookup c. domain d. weak
Answers: 3
image
Computers and Technology, 24.06.2019 23:50, daniecott
Which career involves analyzing various factors that influence the customer decision-making process? analyze various factors that influence the customer decision-making processes. reset next
Answers: 2
image
Computers and Technology, 25.06.2019 03:10, lokiliddel
Write a program to convert a person's height in inches into centimetres #and their weight in stones into kilograms. (1 inch = 2.54 cm and 1 stone = 6.364 kg)
Answers: 1
You know the right answer?
Consider the following class designed to store weather statistics at a particular date and time: pu...

Questions in other subjects: