Which lines would need to be added to CarComponent to put car3 at the middle of the left side of the window?
A) int y3 = (getHeight() - 30) /2; Car car3 = new Car(0, y3) ;
Car3.draw(g2) ;
B) int x3 = (getHeight() - 30) /2; Car car3 = new Car(x3, 0) ;
Car3.draw(g2) ;
C) int y3 = (getWidth() - 30) /2; Car car3 = new Car(0, y3) ;
Car3.draw(g2) ;
D) int x3 = (getWidth() - 30) /2; Car car3 = new Car(x3, 0) ;
Car3.draw(g2) ;
Correct Answer:
Verified
Q28: Which of the following corresponds to the
Q93: We want to create a class that
Q95: If the CarComponent class had the call
Q96: Which statement is true about the following
Q96: Consider the following invocation of the deposit
Q97: Fill in the third line of this
Q98: Assume the method below has been added
Q101: We want to create a class that
Q102: We want to create a class that
Q106: We want the toString method to return
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents