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
ch4aika [34]
4 years ago
12

A class named clock has two instance variables : hours (type int ) and isticking (type boolean ). write a constructor that takes

a reference to an existing clock object as a parameter and copies that object 's instance variables to the object being created. your task: write a clock constructor that makes this possible. just write this constructor -- don't write the whole class or any code outside of the class !
Computers and Technology
1 answer:
Leno4ka [110]4 years ago
3 0
<span>I guess you need it written in Java. So if you need only constructor, then here it is:
public Clock(Clock clock1) {
          this.hours = clock1.hours;
          this.isTicking = clock1.isTicking;
}

This code is 100% correct</span>
You might be interested in
PSEUDOCODE PRACTICE!!! NEED HELP IMMEDIATELY!!! FIRST ANSWER GETS BRAINLYEST!!!
iogann1982 [59]

Answer:

a-nothing b-3 c-9 d-1

Explanation:

5 0
3 years ago
11. The golden rule of safe driving is: A. Always drive at the posted speed limit B. Never drive while physically or mentally im
Nonamiya [84]

Your correct answer is A. Always drive at the posted speed limit.

While B. and C. are logically also correct, I wouldn't call them the "golden" rules. Following A. can help you avoid B. to make matters better, hehe.

3 0
3 years ago
Rico is working on a document titled ‘Document1’. Which is most likely the case for Rico’s document?
Natasha2012 [34]
A. He has not saved the document yet.
reason being is that most documents today will change their title on what it is thats written on the paper unless you personally change it yourself
8 0
3 years ago
Read 2 more answers
Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is the first chara
Nostrana [21]

Answer:

char firstLeter = name.charAt(0);

Explanation:

Consider the program below:

public class num2 {

   public static void main(String[] args) {

     String name = "Smith";

     char firstLetter = name.charAt(0);

       System.out.println(firstLetter);

   }

}

In this program, A string name is defined and assigned the value "Smith".

Java's String method charAt() is called and passed the argument of index 0. This causes it to output the character S. Since this is the first letter in the String is at index 0.

5 0
3 years ago
Why was Unicode invented?
BabaBlast [244]
To short letters to send worldwide.
6 0
4 years ago
Other questions:
  • Nonverbal communication relies on _________________. a. multiple channels b. continuous feedback c. ambiguous interpretation d.
    9·1 answer
  • When the print server processes documents waiting in the queue until the print device is available to accept the print job is ca
    14·1 answer
  • Which type of unshielded twisted pair (UTP) is commonly used in Ethernet 10BASE-T networks, which carry data at a rate of 10 Mbp
    14·1 answer
  • Where is voice data stored in Android?
    11·1 answer
  • You have a friend that says she is interested in going into web development. She is very knowledgeable in terms of technology an
    13·1 answer
  • ___ allow users to select controls by keyboard shortcuts. (Points : 3) Alternative keys
    13·1 answer
  • Review the HTML tags that we have gone over in this lesson. Research HTML tags on the web and identify two new tags. Use these t
    9·1 answer
  • Please help! In your own words explain the difference between a problem and an algorithm.
    13·2 answers
  • *
    6·2 answers
  • True or false. A plug-in card is always required to support pc sound
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!