This Question is related to java Thank you Question Four 0.5 Marks We want to cr
ID: 3590834 • Letter: T
Question
This Question is related to java
Thank you
Question Four 0.5 Marks We want to create a class that represents a clock. A clock has hour, minute, and second. For example, the time 12:15:36 means, it is 12 o'clock, 15 minutes, and 36 seconds. The basic framework of a Clock class is below: rn public class Clock private int hour; private int minutes private int seconds 1. What should the body of the constructor be? A. br- hour; min = minutes sec = seconds B. hour= 12 minutes 15; seconds = 36 c, int hour=bG int minutes = min; int seconds sec; D, hour=bG minutes = min seconds = secExplanation / Answer
Dear Student,
option B is correct.
Explanation:
The complete body of constructor would be.
Clock()
{
hour = 12;
minutes = 15;
sec = seconds;
}
------------------------------------------------------------------------------------------------------------------------------------------
Kindly Check and Verify Thanks...!!!
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.