Questions 13 refer to the Time class declared below public c

Questions 1-3 refer to the Time class declared below: public class Tise private int hrs; private int private int secs; ns; public Tine) t/ inplementation not ahoun / public Tine(int h, int n, int a) / inplementation not sboun / Resets t public void resetTime(iat b, int-, int a) /inplementatioa not shova ./ /.. Advances time by one second. public void increnent O /inplementation not shovn /) /* Greturn true if this tine equals t, false otherwise / public boolean equals(Tine t) / implementation not shova /* Oreturn true if this tise is earlier than t, false othervise public boolean lessThan(Tine t) C /- iaplementation not shova / Oreturn a String vith the tise in the form hrs:mins:secs public String toStringO iaplementation not sbon

Solution

1)Ans)D

Reason:

Here the Time class has only two constructors.

One is default constructor and the other one is parameterized construtor with Three Parameters.

so,the option D is wrong.as it states that the Time class is having 3 constructors.

 Questions 1-3 refer to the Time class declared below: public class Tise private int hrs; private int private int secs; ns; public Tine) t/ inplementation not a

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site