CSCI 3327 Visual Basic Chapter 11: Files and Streams UTPA – Fall 2011 Part of the slides is from Dr. John Abraham’s previous lecture slides. – Xiang Lian
Objectives In this chapter, you will do some exercises about: File and stream manipulations Windows forms GUI
Exercises The smallest data item a computer can process is called a ________. 1. database 2. byte 3. file 4. bit A group of related records is stored in a ____. 1. file 2. field 3. bit 4. byte Data maintained in a file is called _____. 1. persistent data 2. bits 3. secondary data 4. databases Methods from the ____ class can be used to write data to a file. 1. StreamReader 2. WriteFile 3. StreamWriter 4. None of the above Namespace ____ provides the classes and methods you need to perform file processing. 1. System.IO 2. System.Files 3. System.Stream 4. System.Windows.Forms Sometimes a group of related files is called a ____. 1. field 2. database 3. collection 4. byte
Exercises (cont'd) A(n) ____ allows the user to select a file to open. 1. CreateFileDialog 2. OpenFileDialog 3. MessageBox 4. SaveFileDialog Digits, letters, and special symbols are referred to as ______. 1. constants 2. Integers 3. characters 4. None of the above StreamReader method _____ reads a line from a file. 1. ReadLine 2. Read 3. ReadAll 4. ReadToNewline A _____contains information that is read in the order it was written. 1. sequential-access file 2. StreamWriter 3. StreamReader 4. None of the above Methods from class _____ can be used to read data from a file. 1. StreamWriter 2. FileReader 3. StreamReader 4. None of the above
True / False Statement A form is a container. All mouse events use the same event arguments class. A control’s tool tip text is set with the ToolTip property of class Control. Menu items can display ComboBoxes, checkmarks and access shortcuts. The ListBox control allows only a single selection (like a RadioButton) An MDI child window can have MDI children. MDI windows can be moved outside the boundaries of their parent window.