Question: My library > IFT 2 1 0 : Introduction to Java Technologies home > 7 . 4 : Mutators, accessors, private helpers zyBooks catalog Jump
My library IFT : Introduction to Java Technologies home : Mutators, accessors, private helpers
zyBooks catalog
Jump to level
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 then the output is:
Today's weather: sunny, degrees Celsius
SaturdayDetails.java
import java.util.Scanner;
public class SaturdayDetails
public static void mainString args
Scanner scnr new Scanner
System.in;
Saturday weather new Saturday ;
String inputWeather;
double inputTemperature;
inputweather ;
inputTemperature nextDouble ;
Y Your code goes here
System.out.printTodays weather: weather.getWeather;
System.out.println weather.getTemperature degrees Celsius";
Next level
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
