IBM Certification Exams

Real Exams Questions for IBM Certification Exams

Skip to: Content | Sidebar | Footer

Testking 642-415 Cisco certification exam

16 October, 2008 (01:54) | Certification, Certified Solution Designer, Cisco Certification

Chapter 6 Graphics
Lesson 1: Drawing Graphics
1. Which of the following methods would you use to draw a square with a solid
color? 642-415
A. Graphics.DrawLines
B. Graphics.DrawRectangle
C. Graphics.DrawPolygon
D. Graphics.DrawEllipse
E. Graphics.FillRectangle
F. Graphics.FillPolygon
G. Graphics.FillEllipse
1. Correct Answer: E
A.Incorrect: Graphics.DrawLines draws multiple, connected lines. This method
can be used to draw a square, but it cannot be used to draw a filled square.
B.Incorrect: Graphics.DrawRectangle would be the most efficient way to draw
an empty square. However, it cannot be used to draw a filled square.
C.Incorrect: Graphics.DrawPolygon could be used to draw an empty square.
However, it cannot be used to draw a filled square. 642-373
D.Incorrect: Graphics.DrawEllipse is used to draw oval shapes and cannot be
used to draw a filled square.
E.Correct: Graphics.FillRectangle is used to draw filled squares or rectangles.
F.Incorrect: Graphics.FillPolygon could be used to draw a filled square. How-
ever, it is not as efficient as using FillRectangle.
G.Incorrect: Graphics.FillEllipse is used to draw oval shapes and cannot be
used to draw a square.
2. Which of the following methods would you use to draw an empty triangle?
A. Graphics.DrawLines
B. Graphics.DrawRectangle
C. Graphics.DrawPolygon
D. Graphics.DrawEllipse
E. Graphics.FillRectangle
F. Graphics.FillPolygon
G. Graphics.FillEllipse 642-164
2. Correct Answer: C
A.Incorrect: Graphics.DrawLines draws multiple, connected lines. This
method can be used to draw an empty triangle, but it is not the most effi-
cient way.
B.Incorrect: Graphics.DrawRectangle draws empty squares or rectangles.
However, it cannot be used to draw a triangle.
C.Correct: Graphics.DrawPolygon is the most efficient way to draw an empty
triangle.
D.Incorrect: Graphics.DrawEllipse is used to draw oval shapes and cannot be
used to draw an empty triangle.
E.Incorrect: Graphics.FillRectangle is used to draw filled squares or rectangles
and cannot be used to draw an empty triangle.
F.Incorrect: Graphics.FillPolygon could be used to draw a filled triangle. How-
ever, it cannot be used to draw an empty triangle.
G.Incorrect: Graphics.FillEllipse is used to draw oval shapes and cannot be
used to draw an empty triangle.
3. Which of the following classes is required to draw an empty circle? (Choose all
that apply.) 642-144
A. System.Drawing.Graphics
B. System.Drawing.Pen
C. System.Drawing.Brush
D. System.Drawing.Bitmap
3. Correct Answers: A and B
A.Correct: To draw a circle, call the Graphics.DrawEllipse method using an
instance of the Graphics class.
B.Correct: To call the Graphics.DrawEllipse method, you must provide an
instance of the Pen class.
C.Incorrect: System.Drawing.Brush is used to draw filled shapes, not empty
shapes.
D.Incorrect: You can create a Graphics object from System.Drawing.Bitmap;
however, there are many better ways to create a Graphics class.
4. Which of the following brush classes would you use to create a solid rectangle
that is red at the top and gradually fades to white towards the bottom? 640-861
A. System.Drawing.Drawing2D.HatchBrush
B. System.Drawing.Drawing2D.LinearGradientBrush
C. System.Drawing.Drawing2D.PathGradientBrush
D. System.Drawing.SolidBrush
E. System.Drawing.TextureBrush
4. Correct Answer: B
A.Incorrect: HatchBrush defines a rectangular brush with a hatch style, fore-
ground color, and background color.
B.Correct: LinearGradientBrush can be used to fill objects with a color that
gradually fades to a second color.
C.Incorrect: PathGradientBrush can be used to fill objects with a color that
gradually fades to a second color; however, LinearGradientBrush is more
efficient.
D.Incorrect: SolidBrush fills objects with only a single color.
E.Incorrect: TextureBrush is used to fill objects with an image.
5. What type of line would the following code sample draw? 640-802
‘VB
DimgAsGraphics=Me.CreateGraphics
DimpAsPen=NewPen(Color.Red,10)

p.StartCap=LineCap.Flat
p.EndCap=LineCap.ArrowAnchor
g.DrawLine(p,50,50,400,50)

//C#
Graphicsg=this.CreateGraphics();
Penp=newPen(Color.Red,10);

p.StartCap=LineCap.Flat;
p.EndCap=LineCap.ArrowAnchor;
g.DrawLine(p,50,50,400,50);
A. An arrow pointing up 640-801
B. An arrow pointing down
C. An arrow pointing left
D. An arrow pointing right
5. Correct Answer: D
A.Incorrect: The arrow points to the right.
B.Incorrect: The arrow points to the right.
C.Incorrect: The arrow points to the right.
D.Correct: The arrow points to the right.
Lesson 2: Working with Images
1. Which of the following classes could you use to display a JPEG image from an
existing file in a form? (Choose all that apply.)
A. System.Drawing.Image
B. System.Drawing.Bitmap
C. System.Drawing.Imaging.Metafile
D. System.Windows.Forms.PictureBox
1. Correct Answers: A and B
A.Correct: You can load a picture from a file using the Image constructor, and
then call Graphics.DrawImage to display the picture in the form.
B.Correct: The Bitmap class inherits from the Image class and can be used in
most places where the Image class is used. 350-030
C.Incorrect: You cannot use the MetaFile class to load a JPEG image.
D.Incorrect: The PictureBox class is used to display pictures in a form, but it
does not include a method to load a picture from a file.
2. How can you draw a black border around a JPEG image that you have saved to
disk, and then save the updated image back to the disk?
A. Create a Graphics object by loading the JPEG image from disk. Draw the
border by calling Graphics.DrawRectangle. Finally, save the updated image
by calling Graphics.Save.
B. Create a Bitmap object by loading the JPEG image from disk. Draw the bor-
der by calling Bitmap.DrawRectangle. Finally, save the updated image by
calling Bitmap.Save.
C. Create a Bitmap object by loading the JPEG image from disk. Create a
Graphics object by calling Graphics.FromImage. Draw the border by calling
Graphics.DrawRectangle. Finally, save the updated image by calling Bit-
map.Save. 350-018
D. Create a Bitmap object by loading the JPEG image from disk. Create a
Graphics object by calling Bitmap.CreateGraphics. Draw the border by call-
ing Graphics.DrawRectangle. Finally, save the updated image by calling Bit-
map.Save.
2. Correct Answer: C
A.Incorrect: You cannot directly create a Graphics object from a picture saved
to the disk.
B.Incorrect: The Bitmap class does not have methods for drawing graphics.
C.Correct: You must first create a Bitmap object, and then create a Graphics
object from the Bitmap before saving it.
D.Incorrect: There is no Bitmap.CreateGraphics method. Instead, you must
call Graphics.FromImage to create a Graphics object.
3. Which format should you choose to save a photograph that could be opened by
a wide variety of applications? 350-001-Lab
A. ImageFormat.Bmp
B. ImageFormat.Gif
C. ImageFormat.Jpeg
D. ImageFormat.Png
3. Correct Answer: C
A.Incorrect: You can use the BMP format to store photographs; however, the
JPEG format uses much less space.
B.Incorrect: The GIF format is not ideal for storing photographs.
C.Correct: The JPEG format offers excellent quality and compression for
photographs with almost universal application support.
D.Incorrect: The PNG format is very efficient; however, it is not as universally
compatible as GIF and JPEG.
4. Which format should you choose to save a pie chart that could be opened by a
wide variety of applications?
A. ImageFormat.Bmp
B. ImageFormat.Gif
C. ImageFormat.Jpeg
D. ImageFormat.Png
4. Correct Answer: B 350-001
A.Incorrect: You can use the BMP format to store charts; however, the GIF
format uses much less space.
B.Correct: The GIF format is ideal for storing charts.
C.Incorrect: You can use the JPEG format to store charts; however, the results
may not be as clear as the GIF format.
D.Incorrect: The PNG format is very efficient; however, it is not as universally
compatible as GIF and JPEG.

Related posts:

  1. Testking 642-436 Cisco certification infomation chapter 8 Application Domains and Services Lesson 1: Creating Application...
  2. Testking 70-528 Microsoft exam Chapter 5: Lesson Review Answers Lesson 1 1. What file...
  3. Testking 350-029 Cisco simulation test Chapter 9 Lesson 1: Configuration Settings 1. Which code segment...
  4. Testking 70-400 Microsoft exam study guide Chapter 4: Lesson Review Answers Lesson 1 1. You have...
  5. Testking cisco 640-822 certification 1. After configuring a Cisco WAAS deployment using WCCPv2, you...