menu
Qamnty
Login
Register
My account
Edit my Profile
Private messages
My favorites
You are given a class named clock that has one int instance variable called hours. write a constructor with no parameters for the class clock. the constructor should set hours t…
Ask a Question
Questions
Unanswered
Tags
Ask a Question
You are given a class named clock that has one int instance variable called hours. write a constructor with no parameters for the class clock. the constructor should set hours t…
asked
Feb 24, 2017
68.9k
views
1
vote
You are given a class named clock that has one int instance variable called hours. write a constructor with no parameters for the class clock. the constructor should set hours to 12.
Computers & Tech
high-school
Christopher Klein
asked
by
Christopher Klein
7.7k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
4
votes
in java it would be
public clock()
{
hours = 12;
}
Joe Caruso
answered
Feb 27, 2017
by
Joe Caruso
8.0k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Mar 7, 2022
165k
views
Create a Card class that represents a playing card. It should have an int instance variable named rank and a char variable named suit. Give it a constructor with two parameters for initializing the two
Rommex
asked
Mar 7, 2022
by
Rommex
8.3k
points
Computers & Tech
college
1
answer
4
votes
165k
views
asked
Oct 6, 2024
180k
views
Create a class called Food with the following features: a) Two private instance variables; an int called calories and a string called foodName b) Constructor to initialize both instance variables to parameters
Benji
asked
Oct 6, 2024
by
Benji
8.8k
points
Computers & Tech
high-school
1
answer
4
votes
180k
views
asked
Aug 23, 2018
191k
views
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
Utiq
asked
Aug 23, 2018
by
Utiq
8.6k
points
Computers & Tech
college
1
answer
3
votes
191k
views
Ask a Question
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
“What does it mean when we “rework” copyrighted material?”
Seven basic internal components found in a computer tower
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qamnty