AP Computer Science 1.4 Classes and Objects
Recommendation
Want a study guide too?
In this question, which of the choices correctly constructs a Time(int hours, int minutes, int seconds) object?
AP | AP Computer Science |
AP Computer Science | Classes and Objects |
Computer Science | AP Computer Science |
Language | English Language |
Program Implementation | Programming constructs |
Test Prep | AP Computer Science |
Transcript
a question of java syntax and it looks like all
of the potential answers were trying to make a time
object and the variable tea with varying success So let's
bring him down Shmoop we know that creating a new
object requires the word new So let's get rid of
cnd right off the bat No sign of new anywhere
in either option a is also incorrect It just says
that time t equals knew of this array Anu what
a new heart A new boat house and no thanks
option a he is also incorrect The variable tea on
the left isn't being declared as a time object So
that leaves us with me which is right on the
money variability is properly to find us in time Object
new is in place and properly states the name of
the class were creating the object from time Hey you
know the main problem and arguing with a grandfather clock
It keeps shining in and talking over you So money 00:01:24.631 --> [endTime] funds