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
Vlad [161]
3 years ago
7

Write a program that will add the content of two counters every 45 seconds and place the result in an integer register.

Computers and Technology
1 answer:
nexus9112 [7]3 years ago
5 0

Answer:

Explanation:

The following code is written in Java and runs a thread every 45 seconds that adds the two counters together and saves them in an integer variable called register. Then prints the variable. If this code runs 5 times it automatically breaks the loop. This can be changed or removed by removing the breakLoopCounter variable.

 public static void add_Counters(int counterOne, int counterTwo) {

       int register = 0;

       int breakLoopCounter = 0;

       try {

           while (true) {

               register += counterOne + counterTwo;

               System.out.println(register);

               Thread.sleep(45000);

               breakLoopCounter += 1;

               if (breakLoopCounter == 5) {

                   break;

               }

           }

       } catch (InterruptedException e) {

           e.printStackTrace();

       }

   }

You might be interested in
Create a relational database table in Microsoft Excel for the grocery store of 20 employers.
jeyben [28]

Answer:

That is not a question.

Explanation:

5 0
3 years ago
Choose the correct climate association for: deciduous forest
kow [346]

Answer:

Mid Latitude Climate!

Explanation:

I've studied this! Hope this helps! :)

3 0
3 years ago
What is it with the order of operations
MatroZZZ [7]

Answer:

PEMDAS

P-Parenthesis

E-Exponents

M-multiplication

D-division

A-Addition

S-Subtraction

Explanation:

This is the best way to remember the order of operations. It tells us the order that we should take to solve multiple step equations like (3+3)+8.

We would solve inside the parenthesis since its first in line and then add 8

4 0
4 years ago
is a shell program in Windows that holds individual utilities called snap-ins, designed for administration and troubleshooting.
spayn [35]

Answer:

Microsoft Management Console (MMC)

Explanation:

The Microsoft Management Console (MMC) is an administrative tool and shell program that holds individual utilities called snap-ins, designed for administration and troubleshooting. it function is to enable administrator to customize management tools by selecting from a list of available snap-ins in the device manager.

7 0
3 years ago
Complete the sentence with the correct response.
Fiesta28 [93]

Answer:

Material systems developer typically combines the skills of a programmer with the multitasking expectations of developing 3 dimensional models of objects, enhancing the graphical effects.

6 0
3 years ago
Other questions:
  • Stacey wants to change her document to landscape view instead of portrait. Jesse wants to change the scale of his document. Whic
    5·1 answer
  • When should students practice netiquette in an online course? Check all that apply.
    14·2 answers
  • Fill in the blank <br>computers are closed in......​
    6·1 answer
  • Given an initialized String variable outfile, write a statement that declares a PrintWriter reference variable named output and
    12·1 answer
  • ____ is scientifically seeking and discovering facts.
    9·1 answer
  • We cannot imagine a life without the Internet. Imagine that you had to live without being connected to the Internet. Discuss the
    9·1 answer
  • --------------------------------------------------------------------------------------------------------------------------------
    8·1 answer
  • Six security issues and six descriptions are shown below.
    11·1 answer
  • 2. 25 POINTS!!!!!!!!!
    8·2 answers
  • 3. It is important to make certain that your employees are aware of the work ethic
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!