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
Noi needs to send some documents to a client in another company. Which device can she use to make digital copies of the paper fi
soldier1979 [14.2K]
D scanner She can scan the files and email a digital copy.
4 0
2 years ago
Read 2 more answers
Explain in detail what this code does, Whats the flow in it, and whats the risk that its creating and what can i do to fix it? (
kodGreya [7K]

Answer:

The buffer has room for 499 characters (you always have to reserve 1 for the terminating \0 character).

The code copies all characters passed in the commandline (argv[1]) into this buffer without checking. If there are more than 499 characters supplied, these will be copied into a memory location that is not intended for it. This will probably cause your program to crash, but if the extra data is somehow executed by the processor as if it were a program, this could be a way to sneak a virus into your computer.

So, while copying data, it is important to always limit the maximum amount to the allocated space.

5 0
3 years ago
You are setting up your Windows computer to connect to the Internet and notice that when you type www.microsoft, the browser doe
Harrizon [31]

Answer:

Check your DNS settings

Explanation:

Different errors may occur when setting up your computer to connect to the internet, one of which is described in the question above.

The DNS (Domain Name System) is responsible for redirecting domain names to their physical IP address. Instead of remembering every IP address of sites you visit frequently, domain names are used for easy remembrance, the DNS makes the matching of domain names to IP addresses possible.

To change your DNS setting follow these steps:

  1. Click settings from your start menu
  2. Click on Network and Internet
  3. Look to the bottom of the main page and click on "Network and Sharing Center"
  4. On the left tab, click "Change adapter settings"
  5. Right Click on the current network you are using and select properties
  6. Left-click on the "Internet Protocol Version 4 (TCP/IPv4) and click on properties.
  7. Check to see if "Obtain DNS server address automatically" is selected, if it is selected,
  8. Click on the radio button under it "Use the following DNS server address"
  9. Enter the DNS address you want to use
  10. Click Ok and close the window.

The problem should be resolved.

4 0
3 years ago
Steps for turning off two step verification on ,for example, iPhones.
Tems11 [23]

Answer:

Step 1: Visit iCloud.com and log in with your Apple ID and password

At the same time, a window also pops up on iDevice

you need to click "Allow"

Copy the code from your phone to icloud.com

Step 2: Once signed in, select Settings on homepage

Step 3: Click "Manage" Apple ID.

Step 4: You will be directed to another site – appleid.apple.com

input your password to log in and verify it with Apple ID verification code.

Step 5: Then you will enter the manage page.

Click "Edit" in Security column.

Step 6: Click "Turn Off Two-Factor Authentication"

then confirm it.

Step 7: Then you need to select your security questions and answer them

click "Continue" after confirming your birthday and rescue email.

After all of these steps, you have turned off two factor authentication for Apple ID successfully.

Source : https://www.imobie.com/guide/anytrans/how-to-turn-off-two-step-verification-in-icloud.htm

8 0
3 years ago
From which tab can you format individual cell data like any other text? A.Design B. Home C. Table Tools Design D.Table Tools Lay
skelet666 [1.2K]
The answer to this question is the letter "B" which is the HOME tab. When you click the home tab, you can find the different number format in such a way that you can also format the individual cell, it could be data of any other text.
6 0
3 years ago
Other questions:
  • Your brother is starting 9th grade next year and is thinking about going to college. What step would you recommend he take?
    14·1 answer
  • list six external parts or peripherals of a computer system and identify which are output and which are input devices
    8·1 answer
  • Which one of the following characteristics or skills of a ScrumMaster are closelyaligned with coaching?Select one:
    5·1 answer
  • The labels button is found under the
    7·2 answers
  • The World Wide Web is full of unstructured data. Search engines like Google, Bing and Yahoo have been doing a good job of allowi
    6·1 answer
  • Define a function UpdateTimeWindow() with parameters timeStart, timeEnd, and offsetAmount. Each parameter is of type int. The fu
    10·1 answer
  • If you are a mathematics student and want to study the secret of writing cryptographic codes, algorithms, encryption and decrypt
    14·1 answer
  • Which operating system user interface does not reside on the computer but rather in the cloud on a web server?
    5·1 answer
  • Please answer.
    9·1 answer
  • Complete the following sentence.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!