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
gayaneshka [121]
3 years ago
11

You are given a class named Clock that has three instance variables: One of type int called hours, another of type boolean calle

d isTicking, and the last one of type int called diff.Write a constructor for the class Clock that takes three parameters—an int, a boolean, and another int.The constructor should set the instance variables to the values provided.
public Clock(){
int hours, diff;
boolean isTicking;
}
Computers and Technology
1 answer:
Ivahew [28]3 years ago
5 0

Answer:

Clock (int hours, boolean isTicking, int diff) // constructor clock

{

this.hours = hours;

// set the instance variable hours

this.isTicking = isTicking;

// set the boolean variable isTicking

this.diff =diff;

//set the instance variable diff

}

Explanation:

Here we declared a constructor clock which has 3 parameter hours,boolean isTicking,and diff.

The int hours, diff is of int type and isTicking is of boolean type. In this constructor, we set the instance variables values by using this keyword.

You might be interested in
Write a loop that inputs words until the user enters STOP. After each input, the program should number each entry and print in t
vekshin1

I hope this helps you.

3 0
3 years ago
PLSSSSS HELPP!! Tropical rainforests are home to many kinds of birds, including parrots, toucans and eagles. Each different spec
Elanso [62]

Answer:

C I believe

Explanation:

5 0
2 years ago
Read 2 more answers
State four features of information​
Xelga [282]

Answer:

This is your answer

8 0
3 years ago
What type of network is the internet
shtirl [24]

Answer:

The internet is considered as Wide Area Network (WAN).

5 0
2 years ago
What is the reason of non-deterministic (indeterminate) behavior of concurrent programs?
murzikaleks [220]

Answer: Concurrent programs are the programs that execute at the same point of time. They are simultaneous in nature with other concurrent programs.They are executed with the help of threads  to achieve the concurrency without the issue of scheduling. They are consider long running programs.

The program that has the low execution time compared with all other programs gets executed first.If the case of no progress is seen then another thread is executed.This type of execution gives the non- deterministic situation in which the possibility of leading completion of any particular program cannot be determined.

5 0
2 years ago
Other questions:
  • The section called Breaking Substitution Ciphers (p. 166) describes a "random substitution cipher," in which each letter of the
    11·1 answer
  • What is the different between image processing and machine vision? Please explain with an example.
    11·1 answer
  • Variables in PHP must begin with what symbol?
    11·1 answer
  • The item that is clicked in a JList can be retrieved using the _____ method of JList.
    8·1 answer
  • In computers, when the print command is executed, a cable carries this signal from the computer to the printer. In comparing a c
    11·1 answer
  • The area of a rectangle is the rectangle's length times its width.
    5·1 answer
  • What are 3 important reasons to reconcile bank and credit card accounts at set dates?
    15·1 answer
  • Employers can use spyware to track program usage by employees.
    12·1 answer
  • Which one way in which using infrared in game console controllers could affect the experience of a person playing the game?
    8·1 answer
  • after adding a sound to a slide, the audio tools tab will allow you to apply artistic effects and quick styles to your sound ico
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!