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
Vanyuwa [196]
3 years ago
12

Which of the following is false? A static method has no this reference. A static method can be accessed even when no objects of

its class have been instantiated. A static method can call instance methods directly. A static method must be used to access private static instance variables.
Computers and Technology
1 answer:
SVEN [57.7K]3 years ago
3 0

Answer:

Not only can we have static variables in a class, but we can have static methods. ... A static method can be used when the storage in an object is not needed. ... So when a method doesn't need to access any stored values, a static method is ... with the class definition and not each object, we can call static methods which ...

You might be interested in
100 points, PLEASE HELP...To generate numbers between and including -10 to 10 you would use:
Orlov [11]

Answer:

A number line?

6 0
3 years ago
Free point giveaway pt.10 and brainliest to first answer
g100num [7]

Answer:

3+3=6

Explanation:

Tysm!!!

8 0
3 years ago
Read 2 more answers
What does the word "e-business" mean?
Zepler [3.9K]
It stands for Electronic Business, a typical example of this is a online store.
4 0
3 years ago
Read 2 more answers
What was the purpose of the Internet Architecture Board?
Nata [24]

Answer:

c to help build the internets infrastrucuter

Explanation:

6 0
3 years ago
Read 2 more answers
g Write a program that prompts the user for an integer n between 1 and 100. If the number is outside the range, it prints an err
grin007 [14]

Answer:

The cpp program is given below.

#include<iostream>

#include<iomanip>

using namespace std;

int main() {

   

   // variables declared

   int n;

   int sum=0;

   float avg;

   

   do

   {

       // user input taken for number    

       cout<< "Enter a number between 1 and 100 (inclusive): ";

       cin>>n;

       

       if(n<1 || n>100)

           cout<<" Number is out of range. Enter valid number."<<endl;

       

   }while(n<1 || n>100);

   

   cout<<" "<<endl;

   

   // printing even numbers between num and 50  

   for(int num=1; num<=n; num++)

   {

       sum = sum + num;

   }

   

   avg = sum/n;

   

   // displaying sum and average

   cout<<"Sum of numbers between 1 and "<<n<<" is "<<sum<<endl;

   cout<<"Average of numbers between 1 and "<<n<<" is ";

   printf("%.2f", avg);

   

       return 0;

}

OUTPUT

Enter a number between 1 and 100 (inclusive): 123

Number is out of range. Enter valid number.

Enter a number between 1 and 100 (inclusive): 56

 

Sum of numbers between 1 and 56 is 1596

Average of numbers between 1 and 56 is 28.00

Explanation:

The program is explained below.

1. Two integer variables are declared to hold the number, n, and to hold the sum of numbers from 1 to n, sum. The variable sum is initialized to 0.

2. One float variable, avg, is declared to hold average of numbers from 1 to n.

3. User input is taken for n inside do-while loop. The loop executes till user enters value between 1 and 100. Otherwise, error message is printed.

4. The for loop executes over variable num, which runs from 1 to user-entered value of n.

5. Inside for loop, all the values of num are added to sum.

sum = sum + num;

6. Outside for loop, average is computed and stored in avg.

avg = sum/n;

7. The average is printed with two numbers after decimal using the following code.

printf("%.2f", avg);

8. The program ends with return statement.

9. All the code is written inside main() and no classes are involved.

3 0
3 years ago
Other questions:
  • In gaming, "rendering" refers to:
    12·2 answers
  • On your Windows server, you’re planning to install a new database application that uses an enormous amount of disk space. You ne
    11·1 answer
  • MS Excel is a powerful spreadsheet program that helps people with complex mathematical calculations. In what ways could you use
    10·1 answer
  • After reading the article, "The Impact of Technology", answer the following question.
    7·1 answer
  • Match each term to the appropriate definition. DBMS data mining hash file index key field locking protocol relation roll back sc
    10·1 answer
  • PLEASE HELP!!!!! WILL MARK BEST ANSWER BRAINLIEST!!!~~~
    11·2 answers
  • A user finished working on a computer in the lab. What should the user do so
    15·1 answer
  • Design a loop that asks the user to enter a number. The loop should iterate 10
    15·1 answer
  • How many free passes do you get for skipping videos and getting answers
    13·1 answer
  • Why womt this code work????
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!