01. Integrative Programming (VB Overview).pdf

Full Transcript

Visual Basic Overview Louie A. Ruiz, MIT Professor Week 1-Lecture1 Learning Objectives: At the end of the topic sessions, the students should be able to: Identify what type of programming language VB is. Recognize the histo...

Visual Basic Overview Louie A. Ruiz, MIT Professor Week 1-Lecture1 Learning Objectives: At the end of the topic sessions, the students should be able to: Identify what type of programming language VB is. Recognize the history of Visual Basic Recognize the concepts of event-driven programming. Identifies various terms in VB. Identify and describe VB’s Project Development Cycle Identify the steps in creating a VB program. Week 1-Lecture1 Visual Basic Overview ➔ VB is a high-level programming language developed evolved from the earlier DOS version called BASIC. ➔ VB is a software development system developed by Microsoft to support creating applications for the Windows operating systems. ➔ VB introduced the concept of an event-driven programming model. ➔ VB has incorporated the concepts of objects. Week 1-Lecture1 History of Visual Basic ➔ BASIC stands for Beginner’s All-purpose Symbolic Instruction Code ➔ Developed by John Kemeny and Thomas Kurtz in mid- 1960s. ➔ Visual Basic were developed in mid-1991 by the Microsoft Corporation. Week 1-Lecture1 Why Visual Basic? ➔ Power and complete Windows Application development system. ➔ Supported by third party products. ➔ Supports the principles of object driven design. ➔ Very flexible and user-friendly. ➔ The sequence of instructions executed in the program in controlled by events. Week 1-Lecture1 Graphical User Interface (GUI) ➔ GUI allows users to easily operate computers using a pointing device. ➔ Prior to Windows 3.1 IBM PC used a command line interface (MS DOS) ❑ All commands, input and screen output was textual, one line at a time. ❑ Without knowing the commands, users would be unable to proceed. Week 1-Lecture1 Event-Driven Programming ➔ Procedural programs ❑ Execution starts with the first line ❑ Program moves to different sections as required. ❑ The program calls the OS to get user input. Week 1-Lecture1 Event-Driven Programming ➔ Event-Driven programs ❑ Instead of one program there are independent sets of instruction. ❑ Each (user-driven) event is associated with a separate set of instructions. ❑ Code remains idle until called upon to respond to some event (button pressing, menu selection, etc.) Week 1-Lecture1 VB Terminologies ➔ Event Procedure ❑ A block of code that is executed when an object is manipulated in a program. They typically evaluate and set properties and use other program statements to perform the work of the program. Week 1-Lecture1 VB Terminologies ➔ Program Statement ❑ A keyword in the code that does the work of the program. They create storage space for data, open files, perform calculations, and do several other important tasks. Week 1-Lecture1 VB Terminologies ➔ Method ❑ A special statement that performs an action or a service for a particular object in a program. ➔ Class ❑ An implementation of an object type. It has a data structure and methods that specify the operations that may be used with that data structure. Week 1-Lecture1 VB Terminologies ➔ Inheritance ❑ Objects are organized into object classes, which are groups of objects sharing structural and behavioral characteristics.. ➔ Encapsulation ❑ The result (or act) of hiding the implementation details (information hiding) of an object from its user. Week 1-Lecture1 VB Terminologies ➔ Abstraction ❑ The benefit of being able to ignore the inner details of an object in order to focus on the aspects of the object needed to use. ➔ Polymorphism ❑ Creates objects that perform the same functions as the base object but performs some of these functions in a different way. Week 1-Lecture1 Integrative Development Environment (IDE) ➔ Like any other Windows application, VB consists of multiple windows which appear at startup. ➔ The windows displayed in VB are collectively known as the VB Integrated Development Environment (IDE). Week 1-Lecture1 Integrative Development Environment (IDE) ➔ In particular, VB has the following windows: ❑ Main Window which contains Menu and Toolbar ❑ Toolbox ❑ Project Explorer Window ❑ Property Window ❑ Forms ❑ Code Window Week 1-Lecture1 Week 1-Lecture1 Main Window ➔ This is the only element of the IDE which is always visible. Week 1-Lecture1 Toolbox ➔ This is simply a library of controls which can be placed on the application. ➔ It is used to add art-work, labels, buttons, list boxes, scroll bars, menus, and geometric shapes to a user interface. Week 1-Lecture1 Project Window ➔ This is simply a list of all forms and modules which make up your VB project. Week 1-Lecture1 Property Window ➔ Controls such as buttons, scrolling text boxes, pictures boxes and other features of most VB applications allow you to enter parameters which define how these controls work. Week 1-Lecture1 Form Window ➔ They are the windows which hold the various controls (buttons, text boxes, etc.) which make up your application. Week 1-Lecture1 Code Window ➔ This is where you type in the code that VB executes. Notice that the heading of the window indicates with which event the code is associated. Week 1-Lecture1 Program Development Cycle ➔ Analyze: Define the problem ➔ Design: Plan the solution to the problem ➔ Choose the Interface: Select the objects ➔ Code: Translate the algorithm into a programming language ➔ Debug and Test: Locate and remove any errors in the program ➔ Complete the Documentation: Organize all the materials that describe the program. Week 1-Lecture1

Use Quizgecko on...
Browser
Browser