Deck 8: Graphics, Animations, Sounds and Gaming

ملء الشاشة (f)
exit full mode
سؤال
The ____________ package contains classes to draw and paint.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The Color class defines constants and methods used to define colors represented by ____________.
سؤال
Following is the API for the drawArc method of the Canvas class:
public void drawArc( RectF oval, float startAngle, float sweepAngle,
boolean useCenter, Paint paint )
If useCenter is false, we draw a wedge.
سؤال
Following is the API for the drawArc method of the Canvas class:
public void drawArc( RectF oval, float startAngle, float sweepAngle,
boolean useCenter, Paint paint )
If sweepAngle is positive, we draw the arc clockwise; otherwise, we draw the arc counterclockwise.
سؤال
Following is the API for one of the schedule methods of the Timer class:
Void schedule( TimerTask task, long d, long p )
What do d and p represent?

A) They represent two resources.
B) The task will start after d milliseconds; the task will run every p milliseconds.
C) The task will start after p milliseconds; the task will run every d milliseconds.
D) The task will last d milliseconds and will stop after p milliseconds.
سؤال
Once a Timer has started a task, it is not possible to cancel it.
سؤال
Both the invalidate and the postInvalidate methods of the View class have a version that accepts four parameters. These four parameters represent a rectangle within the View.
سؤال
It is possible to play several sounds simultaneously.
سؤال
c is a Canvas object reference, and p is a Paint object reference. What is the only valid statement?

A) p.drawCircle( 45, 50, 10, c);
B) c.drawCircle ( 10, p);
C) c.drawCircle( 45, 50, p);
D) c.drawCircle( 45, 50, 10, p);
سؤال
To create a SoundPool object, we first instantiate a SoundPool.Builder object and call the ____________ method of the SoundPool.Builder class.
سؤال
A Point is defined by ____________ integer coordinates.
سؤال
The Rect class encapsulates a(n) ____________.
سؤال
What method of the Paint class can we use to change the color of a Paint object?

A) setPaint
B) setColor
C) changeColor
D) color
سؤال
The Paint class supports anti-alias drawing.
سؤال
What class defines drawing styles and colors?

A) Paint
B) Style
C) Color
D) Graphics
سؤال
Which of the following is not a value of Paint.Style?

A) FILL
B) STROKE
C) FILL_AND_STROKE
D) NONE
سؤال
What method of the TimerTask class do we need to override and is also called automatically?

A) thread
B) go
C) task
D) run
سؤال
Following is the API for one of the load methods of the SoundPool class:
Int load( Context context, int i, int priority )
What does i represent?

A) A resource
B) The volume of the sound
C) The length of the sound
D) The number of times we will play the sound
سؤال
How do we access the width of a Bitmap object reference named b?

A) int w = Bitmap.width;
B) int w = b.getWidth( );
C) int b = w.getWidth( );
D) int Bitmap.b = getWidth( )
سؤال
The setColor method of the Paint class takes an int parameter; when calling this method, it is possible to pass a hexadecimal number as its argument.
سؤال
In the following statement, c is a Canvas reference, b is a Bitmap reference, r is a Rect reference, and p is a Paint reference.
c.drawBitmap( b, null, r, p );
The bitmap will be drawn in its entirety.
سؤال
It is possible to move a line drawn on the screen by moving your finger on the screen.
سؤال
The drawLine method of the Canvas class has this API:
void drawLine( float a, float b, float c, float d, Paint paint )
In this API, ( a, b ) represents the coordinate of the starting point of the line and ( c, d ) represents the coordinate of the ending point of the line.
سؤال
The BitmapFactory is a factory class to create __________________ objects.
سؤال
The postInvalidate method of the View class that has no parameter triggers a call to the __________________ method and refreshes the whole View.
سؤال
The SoundPool class, part of the __________________ package, enables us to load a sound and play it.
سؤال
The decodeResource method of the BitmapFactory class has this API:
static Bitmap decodeResource( Resources res, int i )
The parameter named i represents the __________________ of a resource.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/27
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Graphics, Animations, Sounds and Gaming
1
The ____________ package contains classes to draw and paint.
android.graphics
2
The Color class defines constants and methods used to define colors represented by ____________.
integers
3
Following is the API for the drawArc method of the Canvas class:
public void drawArc( RectF oval, float startAngle, float sweepAngle,
boolean useCenter, Paint paint )
If useCenter is false, we draw a wedge.
False
4
Following is the API for the drawArc method of the Canvas class:
public void drawArc( RectF oval, float startAngle, float sweepAngle,
boolean useCenter, Paint paint )
If sweepAngle is positive, we draw the arc clockwise; otherwise, we draw the arc counterclockwise.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
5
Following is the API for one of the schedule methods of the Timer class:
Void schedule( TimerTask task, long d, long p )
What do d and p represent?

A) They represent two resources.
B) The task will start after d milliseconds; the task will run every p milliseconds.
C) The task will start after p milliseconds; the task will run every d milliseconds.
D) The task will last d milliseconds and will stop after p milliseconds.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
6
Once a Timer has started a task, it is not possible to cancel it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
7
Both the invalidate and the postInvalidate methods of the View class have a version that accepts four parameters. These four parameters represent a rectangle within the View.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
8
It is possible to play several sounds simultaneously.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
9
c is a Canvas object reference, and p is a Paint object reference. What is the only valid statement?

A) p.drawCircle( 45, 50, 10, c);
B) c.drawCircle ( 10, p);
C) c.drawCircle( 45, 50, p);
D) c.drawCircle( 45, 50, 10, p);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
10
To create a SoundPool object, we first instantiate a SoundPool.Builder object and call the ____________ method of the SoundPool.Builder class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
11
A Point is defined by ____________ integer coordinates.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
12
The Rect class encapsulates a(n) ____________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
13
What method of the Paint class can we use to change the color of a Paint object?

A) setPaint
B) setColor
C) changeColor
D) color
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
14
The Paint class supports anti-alias drawing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
15
What class defines drawing styles and colors?

A) Paint
B) Style
C) Color
D) Graphics
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
16
Which of the following is not a value of Paint.Style?

A) FILL
B) STROKE
C) FILL_AND_STROKE
D) NONE
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
17
What method of the TimerTask class do we need to override and is also called automatically?

A) thread
B) go
C) task
D) run
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
18
Following is the API for one of the load methods of the SoundPool class:
Int load( Context context, int i, int priority )
What does i represent?

A) A resource
B) The volume of the sound
C) The length of the sound
D) The number of times we will play the sound
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
19
How do we access the width of a Bitmap object reference named b?

A) int w = Bitmap.width;
B) int w = b.getWidth( );
C) int b = w.getWidth( );
D) int Bitmap.b = getWidth( )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
20
The setColor method of the Paint class takes an int parameter; when calling this method, it is possible to pass a hexadecimal number as its argument.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
21
In the following statement, c is a Canvas reference, b is a Bitmap reference, r is a Rect reference, and p is a Paint reference.
c.drawBitmap( b, null, r, p );
The bitmap will be drawn in its entirety.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
22
It is possible to move a line drawn on the screen by moving your finger on the screen.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
23
The drawLine method of the Canvas class has this API:
void drawLine( float a, float b, float c, float d, Paint paint )
In this API, ( a, b ) represents the coordinate of the starting point of the line and ( c, d ) represents the coordinate of the ending point of the line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
24
The BitmapFactory is a factory class to create __________________ objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
25
The postInvalidate method of the View class that has no parameter triggers a call to the __________________ method and refreshes the whole View.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
26
The SoundPool class, part of the __________________ package, enables us to load a sound and play it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
27
The decodeResource method of the BitmapFactory class has this API:
static Bitmap decodeResource( Resources res, int i )
The parameter named i represents the __________________ of a resource.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 27 في هذه المجموعة.