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
hodyreva [135]
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, another is of type boolean called isTicking, and the last one is of type Integer called diff.
Computers and Technology
1 answer:
lisov135 [29]3 years ago
4 0

Answer:

public class Clock

// create the class

{

private int hours;

// variable declaration of  hours

private boolean isTicking;

// variable declaration of boolean

private Integer diff;

 // variable declaration of  diff

}

Explanation:

Following are the description of the above code  

  • Firstly create the class called To Create any class we use the keyword class followed by the class name.
  • In the class, we declared three variable one type integer called " hours" The second is type boolean called "isTicking" and the last one is also integer called "diff".
  • They all are three variables are private it means they are not accessible outside the class.
You might be interested in
Assume the following variables are defined: int age; double pay; char section; write a single c instatement that will read input
JulsSmile [24]

Answer:

scanf("%d %lf %c", &age, &pay, &section);

Explanation:

To read the value in c program, the instruction scanf is used.

To read the integer value, use the %d format specifier in the scanf and corresponding variable name age with ampersand operator.

To read the double value, use the %lf format specifier in the scanf and corresponding variable name pay with ampersand operator.

To read the character value, use the %c format specifier in the scanf and corresponding variable name section with ampersand operator.

5 0
3 years ago
Which of the following is a safe work practice to protect you from electrocution hazards?
Flura [38]
What are the answer choices?
7 0
3 years ago
2 inventions revolutionized photography, what are they?
kotegsom [21]
1. George Eastman's film, which was used for early motion pictures,
2. Polaroids instant film, which after being removed from the camera would dry and reveal a picture.

I hope this helps, I had to research these :)
6 0
3 years ago
(tco 8) the process of granting a user access to an application is called _____.
Scrat [10]

I guess the correct answer is Authentication.

The process of granting a user access to an application is called Authentication.

3 0
3 years ago
The overall appearance of goods and services can be trademarked.<br> True<br> False
aliya0001 [1]

Answer:

true

Explanation:

Will you mark me the brainest plz I will follow you

7 0
3 years ago
Read 2 more answers
Other questions:
  • This is Tim’s first job. He is not familiar with how the Internet is used at the workplace. Match the applications of Internet u
    5·1 answer
  • What are 3 characteristics of syndrome E?
    13·1 answer
  • What is the use of html in websites
    15·2 answers
  • Strong emotions can interfere with your ability to
    15·1 answer
  • Which one of the following parts of a universal motor does not move? A. The armature B. The field coil C. The shaft D. The commu
    5·1 answer
  • True / False<br> An instruction’s opcode generally indicates the number and type of its operands.
    5·1 answer
  • Which type of appliance can host several functions, such as antimalware, firewall, content filter, and proxy server
    11·1 answer
  • I need help with Python. The first image is the code and the 2nd is the output.
    8·1 answer
  • Which of the following is the key business objective behind the technologies implemented by PCL Construction, as discussed in th
    11·1 answer
  • The technologist has recorded the red cell morphology as macrocytic. which mcv value would confirm this observation?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!