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
WARRIOR [948]
3 years ago
13

Write the definition of a class WeatherForecast that provides the following behavior (methods): A method called set_skies that h

as one parameter, a String. A method called set_high that has one parameter, an int. A method called set_low that has one parameter, an int. A method called get_skies that has no parameters and that returns the value that was last used as an argument in set_skies. A method called get_high that has no parameters and that returns the value that was last used as an argument in set_high. A method called get_low that has no parameters and that returns the value that was last used as an argument in set_low. No constructor need be defined. Be sure to define instance variables as needed by your "get"/"set" methods.
Computers and Technology
1 answer:
Ann [662]3 years ago
5 0

Answer:

class WeatherForecast(object):

 

skies = ""

min = 0

max = 0

 

def get_skies(self):

return self.skies

def set_skies(self, value):

self.skies = value

def get_max(self):

return self.max

 

def set_max(self, value):

self.max = value

 

def get_min(self):

return self.min

def set_min(self, value):

self.min = value

def main():

obj1 = WeatherForecast()

obj1.set_skies("Skies1")

obj1.set_max(2)

obj1.set_min(0)

print("Calling get_skies(): ", obj1.get_skies())

print("Calling get_max(): ", obj1.get_max())

print("Calling get_min(): ", obj1.get_min())

main()

Explanation:

  • Inside the WeatherForecast class, initialize variables for skies, minimum and maximum.
  • Define the getter and setter method for the necessary variables inside the WeatherForecast class.
  • Create an object of the class WeatherForecast.
  • Call the getter functions of  the class and display the results.
  • Finally call the main function to test the program.
You might be interested in
One advantage of a PAN​
drek231 [11]

Answer:

advantage is:

Data can Synchronize between different devices.

8 0
3 years ago
Read 2 more answers
This type of program is designed to be transmitted over the internet and run in a web browser
vodomira [7]
This sounds like a web-based application because they are designed to be ran within a website, generally with Adobe Flash.
8 0
3 years ago
Alarm filtering may be based on combinations of frequency, similarity in attack signature, similarity in attack target, or other
dezoksy [38]

Answer: False

Explanation:

 The given statement is false, as the alarm filtering is the process of classifying the various type of IDPS alert in the system and it can be managed more efficiently.

The IDPS administrator can easily set an alarm filtering in the running system. It can generate the various types of positive tract in the system and then adjust the different alarm classifications. Alarm filters are same as the packet filter in which they can easily filter the items from the source and destination IP address.

3 0
3 years ago
Tracking a basketball's backspin with an internal sensor can...
valkas [14]
Help a player improve one part of this shooting technique
5 0
3 years ago
You work as a Network Administrator for McNeil Inc. The company has a Linux-based network. You have just created a directory nam
timofeeve [1]

Answer:

E.

Explanation:

Based on the information provided within the question it can be said that the most likely cause is that David does not have the write permission on the directory. This permission basically grants the individual the ability to make changes to a certain file or directory. Therefore if David does not have write permission it would explain why he is unable to save his reports in that directory.

8 0
3 years ago
Other questions:
  • Match the following tasks with their appropriate timing.
    8·1 answer
  • Summarize the distinction between a flat file and a database
    15·1 answer
  • Diane wants to maintain a record of percent change in sales from the year 2000 to the present year. She enters the values of per
    10·1 answer
  • What’s good and bad about having social media?
    14·2 answers
  • Which of the following do you need to remeber about true/false questions?
    12·1 answer
  • We use a cubic equation in which the variables and coefficients all take on values in the set of integers from 0 through p - 1 a
    8·1 answer
  • Which of the following STEM discoverers invented an application that uses summarization technology? Fedkiw Hawking D’Aloisio Gat
    7·1 answer
  • Functions can accept any number of arguments.
    8·1 answer
  • _____ selectors are used to select elements based on elements that are adjacent to them in the document hierarchy.
    9·1 answer
  • An array called numbers contains 35 valid integer numbers. Determine and display how many of these values are greater than the a
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!