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
Q84: Instance variables that are numbers are initialized
Q85: When are local variables initialized?
A)Local variables are
Q86: When are instance variables initialized?
A)Instance variables are
Q87: Which statement is true about the following
Q88: Instance variables that are object references are
Q90: Assuming the following code is the body
Q91: In the statement below, amount is referred
Q92: When drawing complex shapes, what is used
Q93: A method is invoked on what type
Q94: Which of the following denotes the implicit
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