Question: My library > IFT 2 1 0 : Introduction to Java Technologies home > 7 . 4 : Mutators, accessors, private helpers zyBooks catalog Jump

My library > IFT 210: Introduction to Java Technologies home >7.4: Mutators, accessors, private helpers
zyBooks catalog
Jump to level 1
The setWeather() mutator sets field weather to inputWeather and the setTemperature() mutator sets field temperature to inputTemperature. In main(), call setWeather() and setTemperature(), passing arguments inputWeather and inputTemperature, respectively.
Ex: If the input is sunny 71.5, then the output is:
Today's weather: sunny, 71.5 degrees Celsius
SaturdayDetails.java
import java.util.Scanner;
public class SaturdayDetails {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
Saturday weather = new Saturday ();
String inputWeather;
double inputTemperature;
inputweather =scnr*next();
inputTemperature =scnr. nextDouble () ;
Y* Your code goes here */
System.out.print("Today's weather: "+ weather.getWeather());
System.out.println(","+ weather.getTemperature()+" degrees Celsius");
}
1
2
3
4
Next level
 My library > IFT 210: Introduction to Java Technologies home >7.4:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!