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
Why backup system of data and software is necessary. ​
zavuch27 [327]

Answer:

The purpose of the backup is to create a copy of data that can be recovered in the event of a primary data failure. Primary data failures can be the result of hardware or software failure, data corruption, or a human-caused event, such as a malicious attack (virus or malware), or accidental deletion of data.

7 0
3 years ago
Can anyone do this flowchart chart for me could send it to my insta - chelsea.ejb
arlik [135]

Answer:

see attached picture

Explanation:

An algorithm would be:

if hours < 10 then bonus = 0

else if hours <= 15 then bonus = 1000

else if hours <= 20 then bonus = 1500

else if hours <= 25 then bonus = 2000

else if hours <= 30 then bonus = 3000

else bonus = 5000

6 0
3 years ago
Carrie is looking at the Form Properties Sheet. Which tab will control how the data is displayed and the data source it is bound
Lemur [1.5K]
The Answer is: Data


Hope this help
8 0
3 years ago
What is meant by astigmation​
andrey2020 [161]

Answer:

It is a condition where the eye isn't completely round

Explanation:

5 0
3 years ago
Read 2 more answers
Katla is a project manager. One of the programmers on her team comes to her and says that he permanently deleted some code mista
Aleonysh [2.5K]

Answer:

Version Control - Maintains the code log history and changes overtime.

8 0
3 years ago
Other questions:
  • Write code to complete print_factorial()'s recursive case. sample output if user_val is 5: 5! = 5 * 4 * 3 * 2 * 1 = 120
    15·1 answer
  • Which tab in Microsoft Word provides access to the backstage view?
    8·2 answers
  • Jim wants to buy a car, but he’ll probably only need it for a couple of years. He has a short commute to work, so he won’t be pu
    10·1 answer
  • What is the missing line of code?
    10·2 answers
  • A large company has a LAN. The manager of the company wants to change it to a WAN
    10·1 answer
  • 4.8 code practice question 2
    10·1 answer
  • Alexa it is olewi.............................................
    15·2 answers
  • Characteristics of the printer​
    6·1 answer
  • Write any two merits and demerits of computer​
    8·1 answer
  • Please answer me <br> in Assignment - Algorithms
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!