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
NeTakaya
2 years ago
14

You are given a class named Clock that has one int instance variable called hours.

Computers and Technology
1 answer:
Vlad [161]2 years ago
7 0

Answer:

public Clock(int hours) {

       this.hours = hours;

   }

Explanation:

In Java programming language, Constructors are special methods that are called to initialize the variables of a class when a new object of the class is created with the new keyword. Consider the complete code for the class below;

<em>public class Clock {</em>

<em>    private int hours;</em>

<em>    public Clock(int hours) {</em>

<em>        this.hours = hours;</em>

<em>    }</em>

<em>}</em>

In this example above,  an object of this class can created with this statement Clock myclock = new Clock(6); This is a call to the constructor and passes a parameter (6) for hours

You might be interested in
What is the cpu used for
Dahasolnce [82]

Answer:

A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, and input/output (I/O) operations specified by the instructions in the program.

4 0
3 years ago
Fix thos code:Error using spm_check_installation&gt;check_basic (line 93) You do not appear to have the function search path set
grandymaker [24]

Answer:

<em>addpath C:\Program Files\MATLAB\ToolBoxes-20181106T221851Z-001\ToolBoxes\SPM\spm12</em>

<em>savepath</em>

Explanation:

The error clearly indicates that the SPM is missing and is not properly installed. In order to correct this, the following commands are required to be run in the command line of the MATLAB.

These commands will do following.

The first command is the addpath, this will add the path of the toolboxes in the working directory path of the MATLAB

<em>addpath C:\Program Files\MATLAB\ToolBoxes-20181106T221851Z-001\ToolBoxes\SPM\spm12</em>

The second command is the savepath, this will save the additional added path of the working directory for future use.

<em>savepath</em>

5 0
3 years ago
Determine of population size​
damaskus [11]

Answer:

there a 7 billion of people as of 2015 census

3 0
3 years ago
Two parter:
sashaice [31]

Answer:

This is an infinite loop.

Explanation:

The while loop while never end since the last statement inside the while loop will continue to decrement the value of num by 1 and the condition num < 9 will always be true.

So either change the condition of the while loop like: num > -9

or start incrementing the variable num in the last statement of the while loop like:

num = num + 1

Note: Don't make both changes at the same time.

Visit: gotit-pro.com for fastest, top-notch and impeccable homework and exams help in a range of subjects and ace your academics.

Thanks and Best Regards: Your Friendly Study Co-Pilot

6 0
2 years ago
____ is any technology that aids in gathering information about a person or organization without their knowledge.
DanielleElmas [232]

Answer:

Spyware

Explanation:

In most cases, a spywares are unwanted software enters into your computer or other devices and steal sensitive information, your internet usage data, and other information. Spyware is considered a malware type and a malicious one that is aimed at damaging a device or gaining control and access without the knowledge of the owner.

4 0
3 years ago
Other questions:
  • GUI stands for "___ user interface."
    9·2 answers
  • Assume you previously entered these lines of code.
    14·2 answers
  • The small company where you work needs to implement a second server for its accounting system, but does not have the funds to pu
    11·1 answer
  • Assume that the int variables i and j have been declared, and that n has been declared and initialized.
    10·1 answer
  • A technician has been given a PC that is not powering up. After brief troubleshooting, the technician comes to the conclusion th
    14·1 answer
  • Select the correct answer.
    15·2 answers
  • What are the tyoe of typical application of mainframe computer<br>​
    6·1 answer
  • Please help thank u!!!!!
    13·2 answers
  • Select the correct answer.
    15·1 answer
  • What is a key differentiator of Conversational Artificial Intelligence (AI)
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!