Answer:
The answer to this question can be given as:
Class definition:
public class Averager //define class Average.
{
private int sum = 0;
//define variable sum.
private int count = 0;
//define variable count.
public int getSum() //define function getSum().
{
return sum; //return value.
}
public void add(int x)
//define function add().
{
sum = sum + x; //calculate sum
count=count+1; //increase value of count.
}
public int add(int x)
//define function add().
{
return count; //return value.
}
public double getAverage() //define function getAverage().
{
return (double)sum/count; //return value
}
}
Explanation:
The above class definition can be described as:
- In the above class definition first we define a class that is " Averager". In this class we define two integer variable that is "sum and count" and assign a value that is 0. Then we define a functions :
- First we define getSum() function in this function we does not pass any value and the return type of this function is int that will return an integer value.
- Then we define add() function we use this function two times but both functions have different from each other.
- In first time implementation, we define this function and the return type of this function is void which means it does not return any value. In this function, we calculate the sum value and increase the value of the count variable by 1.
- In second time implementation, we define this function and the return type of this function is int which means it will return a value. In this function, we will return the count variable value.
- At the last, we define a getAverage() that calculates the average of the added values in the sum variable and returns its value.
Answer:
You could have a bug, virus, or you might have been hacked the most I can tell you is try to contact a technician to check it and try to help you. It could also be a problem with your internet, maybe you hit your computer against something and it broke something inside, or it could be a technical glitch. I hop this helps! Good Luck fixing your computer!
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The correct option to this question is:
.clr{color:blue;}
I write the complete code of HTML using this CSS style to execute this scenario as given below
<html>
<head>
<style>
.clr
{
color:blue;
}
</style>
</head>
<body>
<a href="pg.html" class="clr">click here</a>
<h2 class="clr">Home</h2>
</body>
</html>
The bold text is a complete code of this question. When you will run it it will execute a link and Home text on the page in blue color. So the correct option is .clr{color:blue;}
Answer:Answer:
TRUE
Explanation:
SATCOM in the Ku- and Ka- bands, as well as EHF systems are adversely affected by rain (the higher the frequency, the greater the effect) because one of the factors that affects availability in a satellites is rain. Higher frequencies in Ka-band (30/20 GHz), rain can have a very large effect that simply cannot be overcome at the usual levels of availability.
Rain reduces the quality of signals by interfering with the signals thereby, reducing their strength and quality.
Therefore Rain can not only degrade a satellite's signal, it can also cause a complete outage of the satellite's.
Answer:
Following is the program in the python language
hr = input("input hours:") #Read input by user
h1 = float(hr)
rate =input("Input Rate:") #Read RATE BY USER
r1 = float(rate) #CONVERT INTO FLOAT
if h1 <= 40: #check condition
t=h1 * r1
print (t) #DISPLAY
else :#else block
t1=(40 * r1) + (h1 -40) * r1 * 1.5
print('The pay is :')
print(t1)#DISPLAY
Output:
input hours:45
Input Rate:10.50
The pay is :
498.75
Explanation:
Following are the description of program
- Read the value of hour in the "hr" variable and convert into the float value in the "h1" variable .
- Read the value of rate in the " rate" variable and convert into the float value in the "r1" variable .
- After that check the condition of hour if block if the hour is less then or equal to 40 then it multiplied h1 *t1 otherwise else block will be executed and print the value of pay .