CSCI 3131.01
Final Review
Chapter 7 Multiple Forms, Standard Modules and Menus
· Add a form into a project and remove a form from the project
· Add a menu to a form; how to add a submenu.
· MenuStrip control
· Associate a menu with code
· Specify Startup form
· Creating an object of a form class using the New keyword
· Show a modal form using ShowDialog and a modeless form using Show
· Close a form using the Close method and hide a form using the Hide method
· Form’s Load event and Activate event
· Form’s Closing event and Closed event
· Class-level variable – how it is declared and its scope
· Standard modules – store shared Sub procedures and Function procedures.
· For standard modules, using Dim or Private to declare module-level variables and Public to declare global variables.
· Sub Main may be used as the start up procedure for the application
Chapter 8 Arrays, Timers and More
· Declare and initialize a one-dimensional array. This statement declares a six-element integer array:
Dim intHours(5) As Integer
· Array can be initialized in the declaration statement:
Dim intNumbers() As Integer = {2, 4, 5, 7, 9, 12}
· Array subscript or index is zero-based
· Search a one-dimensional array
· Compute the sum and average of a one-dimensional array
· Sort a one-dimensional array: descending and ascending
· Copy between arrays
Dim a() As Integer = {1, 2, 3, 4, 5, 6, 7, 8}
Dim b() As Integer = {2, 3, 4, 5}
Array.Copy(b, a, 4) '4 is the number of elements in b
' This makes array a contain:
{ 2, 3, 4, 5, 5, 6, 7, 8}
· Using For Each … Next with array
· Create and manipulate parallel one-dimensional arrays
· Create dynamic array.
Dim Arrayname() As DataType
ReDim [Preserve] Arrayname(UpperSubscript)
· Pass arrays to Sub or Function procedures ByRef or ByVal
· Enabled property
· Timer
· Splash screen
· Random number generation
Chapter 9 Files, Printing, and Structure
· Create a sequential access file
Dim studentFile As StreamWriter
studentFile = File.CreateText("StudentData.txt")
studentFile.WriteLine("Jim")
studentFile.WriteLine(95)
studentFile.WriteLine("Karen")
studentFile.WriteLine(98)
studentFile.WriteLine("Bob")
studentFile.WriteLine(82)
studentFile.Close()
· Open a file for reading
Dim scoresFile As StreamReader
Dim strInput As String
scoresFile = File.OpenText("Scores.txt")
Do Until scoresFile.Peek() = -1
strInput = scoresFile.ReadLine()
lstResults.Items.Add(input)
Loop
scoresFile.Close()
· Detecting end of file: objvar.EndOfStream() or when objvar.Peek() returns -1
· ReadToEnd method
Dim textFile As StreamReader
Dim strInput As String
textFile = File.OpenText("names.txt")
strInput = textFile.ReadToEnd
textFile.Close()
· The OpenFileDialog, SaveFileDialog, FontDialog, and ColorDialog Controls
·
· Structures
[AccessSpecifier] Structure StructureName
FieldDeclarations
End Structure
· Passing structure to Sub or Function procedures.
Chapter 12 Classes, Collections and Scrollable Controls
· Classes
o Abstract Data Types
o Objects
o The Object class in .NET
· Define a class
· Instantiate an object from a class that you define
Private employeeTimeCard As TimeCard
employeeTimeCard = New TimeCard
Dim employeeTimeCard As New TimeCard
· Add Property procedures to a class Properties (Read/Write, Read Only, Write Only)
· Methods (Functions and Sub procedures)
· Include data validation in a class
· Create default and parameterized constructors
· Include methods in a class
· Overload the methods in a class
· Exceptions
· Scrollable Controls
· Class Inheritance
Programming: Students will also need to complete a program which will be a simpler version of programming assignments done in class.