130 likes | 258 Views
Introduction to Programming in VB. Chapter 1. Software Development has four main phases Gathering Requirements Program Design Coding & Testing the Program Implementing the Program. Software Development Life Cycle. Gather Requirements. Design Program. Code & Test Program. Implement.
E N D
Introduction to Programming in VB Chapter 1
Software Development has four main phases Gathering Requirements Program Design Coding & Testing the Program Implementing the Program Software Development Life Cycle Gather Requirements Design Program Code & Test Program Implement
Get requirements document from D2L Make sure you understand the requirements Design the form layout Add code to the program to meet the requirements Test the program under several possible scenarios Submit program for grading in the D2L dropbox CS132 Development Life Cycle Gather Requirements Design Program Code & Test Program Implement
Program Design Basics • A software developer must • Design the visual elements (user interface) and logical function of the program to meet the given specifications • The design is language independent; could be described using flowcharts or pseudocode • Implement this design by writing code that is • functional • easily understood by another programmer • Think of the target audience of a program as being other programmers, not just the computer
Design Tools • Algorithm - finite set of unambiguous instructions, that when given a set of input values, produces the desired outputs, then stops • Like a recipe • Often given in pseudocode, a programming language-like set of natural language instructions • or with a flowchart, a graphical language used to communicate the logic of a program
Describing an Algorithm with Pseudocode • Consider the task of making a peanut butter and jelly sandwich • Given a jar of peanut, a jar of jelly, a loaf of sliced bread, and a knife: • Take two bread slices from the loaf • Open jelly jar; use knife to apply jelly to one slice of bread • Open peanut butter jar; use knife to apply peanut butter to the other slice of bread • Place the bread slices together • What is left out?
Flowcharts • An alternative, graphical way to describe a program’s design Program Flowchart
Implementing design • To complete our software projects we will need to • Understand file management in Windows • Access the CEAS computer labs • Become familiar with the Visual Basic Integrated Development Environment (IDE) • Find information using VB Help
The Windows File System • Double clicking on the “My Computer” icon will invoke the process shown • There are four views of the data, two are shown • Normally, only one view of the window will appear until you open sub-menus
Copying Files • Open two “My Computer” windows, one for the area with files in it and one for the destination area • Mark file(s) in first window to be copied • Click on Edit-Copy • Move to other window • Click on Edit-Paste
Single and Multiple Files (1) Clickleft hand button to select one file and to deselect all others (2) While holding down Ctrl, click to add a file to selection list (3) While holding down Shift, click to add a range of files to selection list click ctrl-click shift-click
(Hint for Later) This business of Click, Ctrl-Click, and Shift-Click will come in very handy later when you wish to select Objects in Visual Basic (VB) for various kinds of manipulation When you want to resize, change font, or move a group of objects, the Ctrl and Shift-Click will really works to your advantage
Visual Basic (VB) • We will be using the Engineering Laboratory to study programming in the Visual Basic Language • In the pictures that follow we will examine how that tool is installed in the Engineering Laboratory, other machines will most certainly differ