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.
Answer:
See explaination
Explanation:
#include <iostream>
using namespace std;
int main()
{
float marks;
cout<<"Enter your grade value :";
cin>>marks;
if(marks>=90)
cout<<"Your grade is 'A'";
else if(marks>=80&& marks<90)
cout<<"Your grade is 'B'";
else if(marks>=70&& marks <=80)
cout<<"Your grade is 'C'";
else if(marks>=60&& marks <70)
cout<<"Your grade is 'D'";
else
cout<<"Your grade is 'F'";
}
Explanation:
<h3>A file is an object on a computer that stores data, information, settings, or commands used with a computer program. On a computer there are three types of files, application files, data files, and system files.</h3>
<h2>hope it helps. </h2><h2>Stay safe healthy and happy.</h2>
Answer:
Zohar abides by his school’s Internet policy and does not visit questionable websites.
Explanation:
Only the first one is ethical behavior. The second choice is an example of plagiarism. The third & fourth choices could be examples of cyberbullying.
Answer:
The answer is option C, which is: perform a task