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
3 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]3 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
Type the correct answer in the box. Spell all words correctly.
ololo11 [35]

foud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsufoud6gdjyrxyutwrhgcghkiyiyofjxgxhdttenhdjgxjxjgztujxjxufudtduyyd6rdgtsu

5 0
2 years ago
Match the crew members with the equipment or tasks they handle.
vovikov84 [41]

Answer:

Boom operator- Microphone

Director of photography- video camera

Art Director- lighting

Gaffer- set building

8 0
3 years ago
The answer for this question?
Debora [2.8K]
It will flow from 2 to 1
6 0
3 years ago
Using Matlab programming I need to rotate the line defined by x,y by 45 degrees around 2,2
belka [17]

Answer:

% here x and y is given which we can take as

x = 2:2:10;

y = 2:2:10;

% creating a matrix of the points

point_matrix = [x;y];

%  center point of rotation  which is 2,2 here

x_center_pt = x(2);

y_center_pt = y(2);

% creating a matrix of the center point

center_matrix = repmat([x_center_pt; y_center_pt], 1, length(x));

% rotation matrix with rotation degree which is 45 degree

rot_degree = pi/4;      

Rotate_matrix = [cos(rot_degree) -sin(rot_degree); sin(rot_degree) cos(rot_degree)];

% shifting points  for the center of rotation to be at the origin

new_matrix = point_matrix - center_matrix;  

% appling rotation  

new_matrix1 = Rotate_matrix*new_matrix;          

Explanation:

We start the program by taking vector of the point given to us and create a matrix by adding a scaler to each units with repmat at te center point which is (2,2). Then we find the rotation matrix by taking the roatational degree which is 45 given to us. After that we shift the points to the origin and then apply rotation ans store it in a new matrix called new_matrix1.

4 0
3 years ago
While accessing mail through the mail command interface, a user sees 5 new messages in his mailbox. Since the second message app
RUDIKE [14]

Answer:

The answer is "print 2".

Explanation:

The mail command, which is also known as the return path, bounce address, as well as mfrom, and sends the back address. This command is used to set the message receiver, order RCPT. It's also composed of the message for the header, and it is the empty line of the message body, and in this command to read the second message we use the print 2 message.

7 0
2 years ago
Other questions:
  • Ian is working as a sales manager. He has to generate sales reports using mathematical data that his team has collected. Which c
    15·1 answer
  • Select the most likely outcome of making only on-time minimum payments to a credit
    11·1 answer
  • Ports on the motherboard can be disabled or enabled in ____ setup. RAM Firmware Northbridge BIOS
    8·1 answer
  • which of the following is involved in ordering an outline. A.grouping B.merging C.organizing D.arranging
    10·1 answer
  • Jennifer frequently uses a few programs on her laptop. Where will she find all the frequently used program icons in her computer
    13·1 answer
  • A bag of cookies holds 40 cookies. The calorie information on the bag claims that there are 10 servings in the bag and that a se
    10·1 answer
  • Raid level 6 is basically the same as RAID level 5, but it adds a second set of parity bits for added fault tolerance and allows
    7·1 answer
  • QUESTION 1
    6·1 answer
  • Could anyone help me with this assignment please?
    6·1 answer
  • 9. These particular machines can be decentralized.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!