CSCI 3131.01

Instructor: Bindra Shrestha

Midterm Review

Chapter 1 Introduction to Programming and Visual Basic

·  Computer hardware and software

Two categories of software

Input Devices and Out Devices examples

·  Programming languages

·  History of Visual Basic

·  Procedural programming and object-oriented programming

·  Event-driven programming model

·  Steps of developing an application

·  Visual Studio 2010 IDE

·  Create and save a solution.

·  Open existing solution

·  Terminology used in object-oriented programming (OOP)

·  OOA – Object Oriented Analysis, OOD - Object Oriented Design, OOP - Object Oriented Principal

·  Attribute and behavior.

·  Class and object.

·  Source code, object code and executable code.

·  Data presentation in computer.

·  Binary number notation.

·  Role of .NET Framework class library and Common Language Runtime (CLR)

·  Intermediate language (IL)

·  Compiler vs. interpreter.

·  ASCII code vs Unicode

Chapter 2 Creating Application with Visual Basic

·  Responding to events

·  One event handler handling one or more events

·  Modifying properties of a control with code: Text, Autosize, BorderStyle, and TextAlign properties

·  Clickable images

·  Debugging an application

·  Using TabIndex and TabStop properties.

·  Visible property, Enabled property, Interval property and Tick event.

·  Designate a default button and a cancel button

Chapter 3 Variables and Calculations

·  Gathering Text Input

·  Variables and Data Types

Naming rules and conventions.

o  Dim, Public, Private, Static keywords.

·  Performing Calculations

·  Mixing Different Data Types

·  Assign data to an existing variable

Floating point number vs. fixed point number

Flexibility and inefficiency of using Object data type

·  Using TryParse method and Convert functions, such as CInt, CDble, CBool CDate, etc. to convert data to appropriate type

How to convert string "5889" into number 5889.

·  Formatting Numbers and Dates

·  Exception Handling

o  Try

o  try-block

o  Catch [exception-type]

o  catch-block

o  End Try

·  The Load Event Procedure

·  Understand the scope and lifetime of variables and named constants

Declaring variables in module, procedure and block - understand the scope and lifetime of them. Using Static keyword to change the lifetime of a variable.

·  Option Strict statement

·  Clear the Text property using code

·  Send the focus to a control using code

·  Format numeric output

commissionLabel.Text = commission.ToString("C")

totalLabel.Text = total.ToString("N2")

rateLabel.Text = rate.ToString("P0")

· 

Chapter 4 Making Decisions and Working with Strings

·  Pseudocode and flowchart

Symbols for flowchart.

·  If … Then statement

·  If...Then...Else statement

·  If…Then…ElseIf statement

·  Nested If statements

·  The Select Case Statement

·  Logical operators

·  Comparing, testing and work with Strings

·  Input validation

·  Radio button

·  Check box

·  MessageBox

·  Concatenate strings

·  Visual Basic constant vbCrLf

·  Change the case of a string

Using the ToUpper() and ToLower methods of String.

·  Determine whether a string contains data

·  Use a message box: MessageBox and MsgBox

·  Nested selection structure

·  Using the To and Is keywords in Select Case statement.

Chapter 5 Lists, Loops, Validation, and More

·  InputBox

·  ListBox

·  Multicolumn Listbox

·  Checked List Box

·  Combo Box

·  Input Validation

·  ToolTips

·  List box and combo box

·  Add, remove, clear items from the list

·  Find item selected in a list box using SelectedIndex and SelectedItem.

·  Find the number of items in a list box using Items.Count of the list box.

·  Using the Sorted property to control the sorting of the items in the list box.

·  Using For Each statement to loop over the items in the list box.

·  Do...Loop statement - know how to use it code

·  Do While … Loop – know how to use it code

·  For…Next Loop - know how to use it code

·  Do Until … Loop

·  Do … Loop While

·  Do … Loop Until

·  Nested Loops

Chapter 6 Procedures and Functions

·  Difference between a Sub procedure and a Function procedure

·  Create a Sub procedure

Private Sub procedurename([parameterlist])

[statements]

End Sub

·  Difference between passing data by value and passing data by reference

For passing data by value: Use the keyword ByVal in the variable declaration.

When the procedure is invoked, only the value of the variable is passed to the procedure.

For passing data by reference: Use the keyword ByRef in the variable declaration.

When the procedure is invoked, the address of the variable is passed to the procedure.

Create a Function procedure

Private Function procedurename([parameterlist]) As datatype

[statements]

Return expression

End Function

·  Examples of Built-in Functions: IsNumeric, CInt

·  Sub procedures and Function for a form procedures can be placed anywhere inside the form class.

·  Local variables. Static local variables.

Programming: Students will also need to complete a program which will be a simpler version of programming assignments done in class.