1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
-
Upload
myrtle-elliott -
Category
Documents
-
view
213 -
download
0
Transcript of 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
![Page 1: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/1.jpg)
1
Integrated Development Environment
Building Your First Project (A Step-By-Step Approach)
![Page 2: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/2.jpg)
2
Objectives
Describe compilers, interpreters, source code files, pseudo code files, native code files, and executable files.
Describe the steps in building an application program.
Describe the steps in building a project with Visual Basic.
Create a Visual Basic project following the step-by-step approach.
![Page 3: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/3.jpg)
3
Programmer’s Lingo
Program - detailed set of instructions for a computer
Programming Language - tool used to create a program; defined by semantics and syntax
Semantics - the meaning of words in a language
Syntax - rules for combining symbols of a language
![Page 4: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/4.jpg)
4
Programmer’s Lingo
Source Code (code) - program you write using a programming language
Interpreter - translates and executes source code statement by statement
![Page 5: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/5.jpg)
5
Programmer’s Lingo
Interpreter Process
![Page 6: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/6.jpg)
6
Programmer’s Lingo
Compiler - translates source code into an executable file
Executable file - standalone file that runs outside the Visual Basic environment; Used to distribute most Windows applications
Package and Deployment Wizard(Application Setup Wizard in VB5) - creates all the files necessary to distribute your projects
![Page 7: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/7.jpg)
7
Programmer’s Lingo
Compiler Process
![Page 8: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/8.jpg)
8
Programmer’s Lingo
Pseudo Code (P-code) - intermediate step between source code and native code
Native Code (machine language) -instructions the computer can execute directly
Dynamic Link Library (DLL) - translates instructions in executable file at runtime
![Page 9: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/9.jpg)
9
Steps in Building a Project
1. Define the Problem
2. Design and Plan
3. Build the Program
4. Run the Program
5. Test and Debug
6. Document Your Program
7. Compile and Distribute Your Program
![Page 10: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/10.jpg)
10
Steps in Building a Project
Step 1 - Define the Problem Decide exactly what problem you want to solve Or task you want to perform Understand what needs to be done Specification - details of your problem definition
![Page 11: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/11.jpg)
11
Steps in Building a Project
Step 2 - Design and Plan Most important step of the process Find a step-by-step solution to your problem Algorithm - step-by-step solution to a problem Design User Interface; draw sketches of screens,
graphics, text and button
![Page 12: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/12.jpg)
12
Steps in Building a Project
Step 3 - Build the Program Translate your solution using the programming
language Coding - writing a program in a programming
language Create the user interface, set properties Write code for commands and instructions
![Page 13: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/13.jpg)
13
Steps in Building a Project
Step 4 - Run the Program Run the program in the programming environment Visual Basic Interactive Development
Environment for VB Simply click the Start button
![Page 14: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/14.jpg)
14
Steps in Building a Project
Step 5 - Test and Debug Testing - running your program and looking for
errors Debugging - process of removing errors from a
program Bug - error in a program Repeat until your program runs as designed
![Page 15: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/15.jpg)
15
Steps in Building a Project
Step 6 - Document your Program Very important if program will be updated in the
future Documentation - consists of notes and materials
that describes a program Organize the documentation
![Page 16: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/16.jpg)
16
Steps in Building a Project
Step 7 - Compile and Distribute Proceed to this step only after all bugs have been
discovered and removed Distribute program to end user End User - the target audience for your final
program
![Page 17: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/17.jpg)
17
Steps in Building a Deck
1. Define the Problem - deck for grill, table and 4 chairs
2. Design and Plan - sketch a floor plan
3. Build the Deck - oops, forgot stairs
4-5. Run, Test, and Debug - as we built
6. Document the Work - receipts and plans
7. Compile and Distribute - invite friends for a cookout to share and enjoy new deck
![Page 18: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/18.jpg)
18
Critique the Process
Programming is a building process Make-or-buy decision - build it or buy it Look for flaws before building Much easier and less expensive to correct flaws
during specification step Work smart; gather documentation throughout
process Test and debug to avoid dissatisfied customers
and potential lawsuits
![Page 19: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/19.jpg)
19
Build a Visual Basic Application
![Page 20: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/20.jpg)
20
Build a Visual Basic Application
1. Define the Problem
2. Design and Plan
3. Build the Program
4. Run the Program
5. Test and Debug
6. Document your Program
7. Compile and Distribute
![Page 21: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/21.jpg)
21
Build Your First Application
Hands-On Exercise 1 (p.47-57) Create a New Project Set Visual Basic Options Restart Visual Basic Create the Initial Screen Create the Final Screen Add an Image to the Final Screen Save Your Project Run Your Project Close the Project and Exit Visual Basic
![Page 22: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/22.jpg)
22
Project Files
vbp extension = Visual Basic Project file that tracks all components
frm extension = Form file separate file for each form
frx extension = Binary form file cannot be read by humans
vbw extension = Visual Basic workspace
![Page 23: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/23.jpg)
23
The File Menu
Project commands
Make executable commands
Most recent project list
Exit command
![Page 24: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/24.jpg)
24
The File Menu
New Project Open Project Add Project Remove Project Save Project Save Project As
Save Component Save Component As Print Print Setup
![Page 25: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/25.jpg)
25
The File Menu
Template - particular pattern for a project or a project element; start a project from a template saves time
Existing tab - displays VB projects
Recent tab - displays most recently accessed projects
Project Groups - a collection of several projects
![Page 26: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/26.jpg)
26
Using the Code Editor
GUI (Graphical User Interface) - forms and windows that the user sees
Property - a characteristic or attribute of an object such as color and size
Event - a user action such as clicking a button
Code Editor window - editor specially designed to help you when writing code
![Page 27: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/27.jpg)
27
Testing and Debugging
Humans are not perfect Rarely code programs right the first time Test to find problems Debug to correct problems First bug - Grace Hopper story
![Page 28: 1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)](https://reader036.fdocuments.us/reader036/viewer/2022081603/56649e025503460f94aec2c5/html5/thumbnails/28.jpg)
28
Code, Test and Debug Your First Application
Hands-On Exercise 2 (p.63-71) Open the Hello World Project Change the Form’s properties Change the Command Button’s properties Change the Label’s properties Change the Image’s property Add Code for the Click Here button Add Code for the Exit button Save and Run your project Test and Debug your project Exit Visual Basic
End of Lecture