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
Once you fix the bug in a code, what is the last thing you should do?
aleksklad [387]

Answer:

Know what the code should do

4 0
3 years ago
List two panels that allow you to adjust the properties of your titles.
antiseptic1488 [7]

Answer:

1. The tools panel

2. The actions panel

Explanation:

The tools panel contains properties that allow for text and object creation. The actions panel contains properties that allow for the alignment and distribution of titles.

Under the tools panel, we can find properties like; line, arc, an arrow for selection, different shapes like rectangle and the clipped corner, vertical type, vertical area type, vertical path type, etc. Under the actions panel, properties like; align, center, and distribute can be found.

8 0
3 years ago
1. Write a SELECT statement that returns these columns: The count of the number of orders in the Orders table The sum of the Tax
Arada [10]

Answer:

SELECT

COUNT(SN), SUM(TaxAmount)

FROM ORDERS  

or

SELECT

COUNT(SN) AS NumOrder, SUM(TaxAmount) As TotalTax

FROM ORDERS

Explanation:

Finding it difficult to add my explanation. So, I used an attachment instead

<em />

Download docx
8 0
3 years ago
Describe what metadata are and what value they provide to the database system.
postnew [5]
Metadata is data about data.

For example, a mp3 file is data, metadata would be data explaining the artist, song name, album, etc.

In a database, the data would be a record, metadata about this could include if the data was an integer or a string, as well as the size limit for this field.
4 0
4 years ago
QUESTION 4 of 10: What term refers to the basic characteristics of a population segment, such as gender, age, and income?
marshall27 [118]
272727727272727226282829292
7 0
4 years ago
Read 2 more answers
Other questions:
  • What does it mean for a school to be “accredited”?
    5·1 answer
  • Which of the following is not true about designing classes? In order for class information to be printed instead of a memory add
    12·1 answer
  • How do i move an sd card from 1 phone to another phone?
    13·1 answer
  • A "shooting star," or meteor, is actually a meteoroid that burns up in Earth's atmosphere.
    13·1 answer
  • Given that<br>f(x) = 5x +3.<br>Find f (4)​
    15·2 answers
  • Which of the following commands should be used if a user does NOT want the header which has been created to appear on the first
    13·1 answer
  • Please help! first one to answer correctly gets brainliest and thanked
    7·1 answer
  • What is the meaning of url <br>​
    7·1 answer
  • P*********** is considered a serious social problem justify this statement​
    15·2 answers
  • What are the methods of gilding<br><br>nonsense will be immediately reported. ​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!