CSC110 CHAPTER 311/2/2018

Name______

Objects:

Textbox:

  1. Primary Use______
  2. Properties most frequently changed ______
  3. The text property is what kind of data? ______
  4. The size of the text box can be changed in what directions? ______
  5. What Property can I change so that I can add more than one line of data to my textbox? ______
  6. What property can I change so that all the data stored in the text box can be viewed?______
  7. What property do I change when I want to use a textbox as an output object? ______

Label:

  1. What is the primary use of a label?______
  2. Properties most frequently changed?______
  3. Can we store data in a label object?______
  4. Can I store an image in a label object?______
  5. When an image is inserted into the label, where does the text property appear?______

Button:

  1. What is the primary use of a button object? ______
  2. Can you insert an image on a button object?______
  3. Changing the backcolor property of your button does what?______

ListBox

  1. What is the primary use of a Listbox object? ______
  2. Can you insert an image on a listbox object?______
  3. Changing the forecolor property of your button does what?______
  4. What are two methods commonly used with a listbox? ______

Prefixes: What are the prefixes for the following objects?

Object / Prefix
Label
Textbox
Button
Listbox
Checkbox
Option button
Picture
Form

Documentation

  1. What are comments?______
  2. Where should the appear? ______
  3. What four comments should you place at the beginning of each program?
  4. ______
  5. ______
  6. ______
  7. ______

Events:

  1. What is an event? ______
  2. How can you get the default event to appear in the coding window?
  3. ______
  4. What do we call the first statement of every event? ______
  5. Event coding structure in VB.Net should have a closing statement. What is the name of the statement and how should it end? ______, ______
  6. Write the procedure declaration statement for a change event for txtFirstName ______
  7. What part of this statement can be changed? ______
  8. The keyword Private indicates the focus of the procedure. What focus does a private procedure have?______
  9. Can a procedure have other levels of focus?______, what?______
  10. Do objects have focus?______, what kinds of focus? ______

Coding Window:

  1. How do you bring up the coding window? ______
  2. There are two dropdown boxes in the coding window, what are they called and what do they contain?
  3. ______
  4. ______
  5. Where does the programmers code procedures begin? ______
  6. When you type the name of an object in the coding window and place a period to the right of the object name, a dropdown box appears. What is contained in this box?______
  7. How can you tell properties and methods apart in your code? ______
  8. properties can be compared to what part of speech? ______
  9. methods can be compared to what part of speech?______
  10. Write a statement and use a property to clear the input for the object txtAddress.
  11. ______
  12. Rewrite the above statement using a method.
  13. ______
  14. You can display the font properties of the textbox object to the screen at run time. Can the font properties of a textbox be changed in the coding window to change at run time? ______
  15. Where should you change the font properties of objects?______
  16. What event will be generated for you in the coding window when you double click on a label object from the user interface form? ______
  17. What event will be generated for you in the coding window when you double click on a listbox object from the user interface form? ______
  18. What statement is used to display data and string text in objects at runtime?
  19. ______
  20. What statement is used to change property values at runtime?
  21. ______
  22. How do you disable the textbox? ______
  23. How do you remove the textbox from the form at runtime? ______

Numbers:

Type name / Prefix / Upper Range
Double
Long
Integer
Currency
Single
Short

Number Arguments

  1. What characters can be used in a numeric argument name? ______
  2. What does the word dimension refer to? ______
  3. Declare an argument to hold the class average and give it an appropriate variable type.______
  4. What variable type is intrinsic to the textbox text property? ______
  5. If you want to store the data typed into a textbox in a numeric argument what must you do?
  6. ______

Numeric type conversion functions

Type name / New Conversion function / Value in textbox / Outcome
Double / 136.50 * 25
Long / 32500 * 10.5
Integer / 32500 * 10.5
Currency / $5.00
Single / 125.456213879

CType is a generic type conversion function, what does it do and how does it work______

What is the order of operations for numeric calculation

______

What is the outcome of these equations?

Equation / Outcome / Explain what operation come first
7+3 * 10 / 2+5 -8 / 19
((7+3) * 10 / (2+5)) -8 / 6.29
3 + 4 * 5 / 23
(3 + 4) * 5 / 35
1/2^3 / 0.13
1/(2^3) / 0.13

Strings:

  1. What characters can be used in a string argument name? ______
  2. How does a string argument differ from a numeric argument? ______
  3. Write the dimension state to declare an argument to hold the last name of a student in a student database. ______
  4. Rewrite the statement to set the initial value to “Richard Prior”
  5. List two string methods. ______
  6. List three string function:
  7. ______
  8. what does it do? ______
  9. ______
  10. what does it do?______
  11. ______
  12. what does it do? ______
  13. Write the appropriate statement to store the concatenated result of str1, str2, str3 in the text property of txtOutput. ______
  14. What does the & do to the strings? ______
  15. What is another use for the & symbol in VB? ______
  16. Looking at the following statement:

Dim a, b, c, as String

  1. What will be the outcome?______
  1. What if anything is wrong with the following statements:

TxtPrice.Font.Bold = True
Dim dblPrice as Double = “$150.00”
Dim shoPopulation as Short = 32768
TxtOutput.Text = str1 + str2 + str3
dblQuote = txtQuote.text

1. What are the open modes for sequential files access? ______

2. What modes allow the program to write to the file? ______

3. What mode allows the program to read from the file? ______

4. Write the dimension statement creating the StreamReader object which will open the “college.txt” file to be read from the disk. ______

5. What is the name of your read argument for StreamReader? ______

6. What method for the sr argument would you use to read the first data instance from the file? ______

7. What method would you use to add data to the file? ______

8. Write the dimension statement to open the file to write new records to the bottom of the college file. ______

9. What argument did you use for the StreamWriter? ______

10. What mode is the file opened to? ______

11. Create a With Block to add three student records to the lstOutPut list box. Clear the object first.