menu
Qammunity
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
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 to 12.
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 and Technology
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 and Technology
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 and Technology
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 and Technology
college
1
answer
3
votes
191k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
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 Qammunity