AP Computer Science 1.4 Classes and Objects

In this question, which of the choices correctly constructs a Time(int hours, int minutes, int seconds) object?

APAP Computer Science
AP Computer ScienceClasses and Objects
Computer ScienceAP Computer Science
LanguageEnglish Language
Program ImplementationProgramming constructs
Test PrepAP Computer Science

Transcript

00:24

a question of java syntax and it looks like all

00:27

of the potential answers were trying to make a time

00:30

object and the variable tea with varying success So let's

00:34

bring him down Shmoop we know that creating a new

00:38

object requires the word new So let's get rid of

00:41

cnd right off the bat No sign of new anywhere

00:44

in either option a is also incorrect It just says

00:47

that time t equals knew of this array Anu what

00:52

a new heart A new boat house and no thanks

00:55

option a he is also incorrect The variable tea on

00:58

the left isn't being declared as a time object So

01:04

that leaves us with me which is right on the

01:06

money variability is properly to find us in time Object

01:10

new is in place and properly states the name of

01:14

the class were creating the object from time Hey you

01:17

know the main problem and arguing with a grandfather clock

01:20

It keeps shining in and talking over you So money 00:01:24.631 --> [endTime] funds