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
Mazyrski [523]
3 years ago
12

Write the definition of a class clock. the class has no constructors and three instance variables. one is of type int called hou

rs, initialized to 12, another is of type boolean called isticking, and the last one is of type integer called diff. instructor notes: recall that you can initialize an instance variable on the same line that you declare it.
Computers and Technology
1 answer:
expeople1 [14]3 years ago
4 0
<span>The definition of a class clock. the class has no constructors and three instance variables. one is of type int called hours, initialized to 12, another is of type boolean called isticking, and the last one is of type integer called diff. 
</span><span>
public class Clock

{private int hours = 12;
private boolean isTicking;
private Integer diff;}</span>
You might be interested in
True or false? malware problems and other compromises of your computer information are rare.
Marina86 [1]
I think that is false I am not 100% sure.
3 0
3 years ago
The person or persons requesting the worksheet should supply their requirements in a _____ document
ziro4ka [17]
<span>The person or persons requesting the worksheet should supply their requirements in a requirements document. </span>
3 0
3 years ago
Why are video games interesting?
TiliK225 [7]
Because there fun and helps boys get together or to get ur mind off of stuff
5 0
3 years ago
The birthday paradox says that the probability that two people in a room will have the same birthday is more than half, provided
poizon [28]

Answer:

The Java code is given below with appropriate comments for explanation

Explanation:

// java code to contradict birth day paradox

import java.util.Random;

public class BirthDayParadox

{

public static void main(String[] args)

{

   Random randNum = new Random();

   int people = 5;

   int[] birth_Day = new int[365+1];

   // setting up birthsdays

   for (int i = 0; i < birth_Day.length; i++)

       birth_Day[i] = i + 1;

 

   int iteration;

   // varying number n

   while (people <= 100)

   {

       System.out.println("Number of people: " + people);

       // creating new birth day array

       int[] newbirth_Day = new int[people];

       int count = 0;

       iteration = 100000;

       while(iteration != 0)

       {

           count = 0;

           for (int i = 0; i < newbirth_Day.length; i++)

           {

               // generating random birth day

               int day = randNum.nextInt(365);

               newbirth_Day[i] = birth_Day[day];

           }

           // check for same birthdays

           for (int i = 0; i < newbirth_Day.length; i++)

           {

               int bday = newbirth_Day[i];

               for (int j = i+1; j < newbirth_Day.length; j++)

               {

                   if (bday == newbirth_Day[j])

                   {

                       count++;

                       break;

                   }

               }

           }

           iteration = iteration - 1;

       }

       System.out.println("Probability: " + count + "/" + 100000);

       System.out.println();

       people += 5;

   }

}

}

4 0
3 years ago
What's the difference between natural systems and man made systems <br>​
Aneli [31]

Answer:

Natural systems are already in place while man made systems were created by humans manipulating things in some way.

Explanation:

man made: human created

natural systems: existed without interference

5 0
2 years ago
Other questions:
  • which of the following is true about both the cyber community and the real community like the one you live in,i will give 10 poi
    6·1 answer
  • ______ is the software that prevents people from being able to access your personal information.
    8·2 answers
  • Which number is the decimal equivalent of 1100110 – 101101?
    13·2 answers
  • If(moreDate == true)
    7·1 answer
  • Who was the creator of the game Fnaf?
    11·2 answers
  • You are critiquing a logo design that one of your coworkers proposed. Your sense is that the individual elements of the design a
    10·1 answer
  • PLEASE ANSWER FAST.one of the barriers for early "talkies" was the need to manually crank the projector and manually synchronize
    13·1 answer
  • Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and th
    12·1 answer
  • When you add encryption to a powerpoint presentation what does it do
    14·1 answer
  • It would be at least two decades before some of
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!