Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Answer the questions by circling the correct answer. What statement is true abou

ID: 3799328 • Letter: A

Question

Answer the questions by circling the correct answer. What statement is true about the code? Dim random Sum as New Random Dim Value as Integer value = random Num. Next (10, 20) It returns a random value in the range 10.. 20. It returns a random value in the range 10..19. It returns a random double value in the range 0.0... 1, 0 It sets the seed of the random number generator to value 10. If a random number generator begins with the same seed. it generates the same sequence of values True False Which Size Mode property value should be set if you wish the image to be placed in the upper left corner retaining its original size. with possible cropping if it does not fit. Auto Size Center Image Normal Stretch Mode Assume a Picture Box is sized at 80, 80 and the image loaded into it is size 160, 160. What is the effect of the Stretch Image value of the Size Mode property as applied to this Picture Box? The image is shrunk so that it appears in its entire form in the box. The image is dipped so that only the upper left comer appears in the box. The Picture box is enlarged to size 160, 160 to accommodate the image. When using an Image List control to store images for use in a program, these images are loaded into memory when the application begins. True False What is the index of the first image loaded into an image List container? 0 1 This value is set by the programmer at Design time.

Explanation / Answer

1. What statement is true about the code?

Dim randomNum As New Random
Dim value As Integer
value=randomNum.Next(10,20)

Ans: b. It returns a random valuein the range 10...19

Explaination: The randomNum.Next(10,20) method defination as below.

Public Overridable Function Next (
   minValue As Integer,
   maxValue As Integer
) As Integer

Where Parameters:
minValue
The inclusive lower bound of the random number returned.
maxValue
The exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue.

2. If a random number generator begins with the same speed, it
generates the same sequesnce of values.

Ans: b. False

Explaination: The random number generator is not depends on speed of calling Next(minValue,maxValue).

3. Which SizeMode property value should be set if you wish the image to be placed in the upper left corner retaining its original size, with possible cropping if it does not fit.

Ans: c. Normal

4. Assume a Picture Box is sized at 80, 80 and image loaded into it is size 160, 160. What is the effect of the StretchImage value of ths SizeMode property as applied to this PictureBox?

Ans: The image is shrunk so that it appears in its entire in the box.

Explaination:
Using the StretchImage value causes the image to stretch or shrink to fit the PictureBox.

5. When using an ImageList control to store images for use in a program, these images are loaded into memory when the application begins.

Ans: a. True

6. What is the index of the first image loaded into an ImageList container?

Ans: c. This value is set by the programmer at Design time.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote