Introduction to Programming

Slides:



Advertisements
Similar presentations
File management GAP Toolkit 5 Training in basic drug abuse data management and analysis Training session 2.
Advertisements

Windows Basics An Introduction to the Windows Operating System.
CE 311 K Introduction to Computer Methods VB Controls and Events Daene C. McKinney.
Computer Basics Hit List of Items to Talk About ● What and when to use left, right, middle, double and triple click? What and when to use left, right,
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
Introduction to Visual Basic Programming. Lecture Outline History What is Visual Basic First Look at the VB 6.0 Environment Some VB Terminology Our first.
Exploring the Basics of Windows XP. Objectives Start Windows XP and tour the desktop Explore the Start menu Run software programs, switch between them,
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
The sequence of folders to a file or folder is called a(n) ________.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Exploring the Basics of Windows XP
Laboratory Exercise # 3 – Basic File Management Office Productivity Tools 1 Laboratory Exercise # 3 Basic File Management Objectives: At the end of the.
Digital Image Processing Lecture3: Introduction to MATLAB.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Microsoft Office 2003 Illustrated Introductory with Programs, Files, and Folders Working.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
IE 411/511: Visual Programming for Industrial Applications
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
USER INTERFACE.
Introduction To Windows Operating Systems Manipulating Windows GUI
PROBLEM SOLVING The first step in writing instructions to carry out a task is to determine what the output should be (What should the task produce?)
Fall 2005 Using FrontPage to Enhance Blackboard - Darek Sady1 Using FrontPage to Enhance Blackboard 1.Introduction 2.Starting FrontPage 3.Creating Documents.
Chapter 11 An Introduction to Visual Basic 2008 Why Windows and Why Visual Basic How You Develop a Visual Basic Application The Different Versions of Visual.
XP New Perspectives on Windows XP Tutorial 1 Exploring the Basics.
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
1 Microsoft Windows 2000 Robert H. Smith School of Business University of Maryland – College Park Essentials of Windows.
Basic Controls & Properties Chapter 2. Overview u VB-IDE u Basic Controls  Command Button  Label  Text Box  Picture Box u Program Editor  Setting.
Productivity Programs Common Features and Commands.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction It is developed to create software applications. It is a tool for developers of any program that uses both basic and expert settings. It.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
CHAPTER TWO INTRODUCTION TO VISUAL BASIC © Prepared By: Razif Razali 1.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Chapter Two Creating a First Project in Visual Basic.
Windows NT1 In the lower left hand corner of the Windows screen we see the Windows Start button. The My Computer icon is at the top of the window. Other.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
CMPF124: Basics Skills for Knowledge Workers Manipulating Windows GUI.
Introduction to Programming in VB Chapter 1. 2 Software Development Life Cycle Gather Requirements Design Program Code & Test Program Implement u Software.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
Know your computer Make a Folder Copy from Word to Composer Format the Font Change the Alignment Format the Background Format the Colors Insert a Picture.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Module 2 Part II Introduction To Windows Operating Systems Manipulating Windows GUI Introduction To Windows Operating Systems Manipulating Windows GUI.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
1 Lesson 9 Windows Management Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
1. Using word you can create the document and edit them later, as and when required,by adding more text, modifying the existing text, deleting/moving.
Today We Will Review: Operating Systems (Windows) (week 3 & 4) Starting up MS Windows Desktop and its contents Functions of the desktop components Brain.
MS WORD INFORMATION TECHNOLOGY MANAGEMENT SERVICE Training & Research Division.
Chapter 2 – Introduction to Windows Operating System II Manipulating Windows GUI 1CMPF112 Computing Skills for Engineers.
Windows 7 and file management
Chapter Lessons Start Adobe Photoshop CS
1. Introduction to Visual Basic
3.01 Apply Controls Associated With Visual Studio Form
An Introduction to Computers and Visual Basic
Microsoft Office Illustrated Introductory, Premium Edition
CIS16 Application Development Programming with Visual Basic
Digital Image Processing
An Introduction to Computers and Visual Basic
3.1 Basic Concept of Directory and Sub-directory
An Introduction to the Windows Operating System
Presentation transcript:

Introduction to Programming

Software Development Life Cycle Gather Requirements Design Program Code & Test Program Implement Software Development has four main phases Gathering Requirements Program Design Coding & Testing the Program Implementing the Program The software development cycle is the process by which a program/application is constructed. While there are many different methodologies (e.g. waterfall), they all have the main phases above.

CS132 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 For INFS639, our life cycle is truncated quite a bit. You will get requirements form the book; Some even have screen designs for you. This is a little unrealistic though; that is why two designs (Sept 29 and Oct 13) to do independently. Some of the programs build on each other, so you want to make sure you keep a copy of what you give me. You will be responsible to code and test your programs before submitting. The implementation phase of the life cycle for the class is abbreviated into you handing the program in.

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 both functional and easily understood by another programmer Think of the target audience of a program as being other programmers, not just the computer Describes a programmer’s job. I always think of a programmer as a translator. He or she must be able to translate what the user says they want into something the computer recognizes.

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 pseudocode, a programming language-like set of natural language instructions Flowchart - a graphical language used to communicate the logic of a program For our purposes, algorithm and pseudocode will be used interchangeably. You may also see the same process called Structured English. They all mean the same thing; a structured way to think about and design code. Flowcharts are a bit antiquated, but the concepts inherent with them is still valid. Again, flowcharts are another way to provide structure to a very unstructured process.

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 System Flowchart Program Flowchart There are two main sets of flowcharting symbols: system and program. We are going to deal with the program level in the later chapters when the logic gets a little more complex. For now, we will practice going between algorithms and flowcharts.

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) Click left 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.

(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 really works to your advantage.

Engineering Lab Drives The Engineering Laboratory has several drives available to you. In general they are named A, C, I, Q, R & S. A: The floppy disk drive, 3.5 inch, 1.4 (or 0.7) megabytes C: The local hard drive, belongs to the machine you are sitting in front of (the local machine). I: A part of the disk “farm”. Each of us has his own copy of drive “I” with a 40 megabyte capacity. Q, S: The software “farm”. You may execute some files, copy other but cannot change any of them. R: A part of the disk “farm” with special software for each class. R:\cs132 contains class material.

Engineering Lab Drives

I & M T Lab Drives Drive P on this system is not the same space as Drive I in the Engineering lab system.

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.

Accessing Visual Basic (VB)

Visual Basic Files When you save a program in VB several files are created. The two that are most significant are the .frm and the .vbp files, the form and program files. Both of them are text files.

The File Blink.frm Begin VB.Form Form1 Private Sub blink_Click() If blink.Caption = "blink on" Then Timer1.Interval = 500 blink.Caption = "blink OFF" Else Timer1.Interval = 0 blink.Caption = "blink on" End If End Sub . . .

The File Blink.vbp Type = Exe Form = A:\BLINK.FRM Name="Project1" RevisionVer = 0 AutoIncrementVer = 0 ServerSupportFiles = 0 VersionCompanyName="UWM EECS Dept." . . .

Moving VB Projects VB allows a program file on drive A to use a form file on drive I. Saving (or copying) a project file to another directory or drive will not move its form file If you wish to transport your program on a floppy disk, BE SURE to copy both the .FRM and the .VPB files.

The Visual Basic IDE

The Workspace & Toolbox

Selecting Tools Using the toolbox and the Workspace Window you can build a form that has nearly any desired appearance Double click on an icon in the toolbox to create a new instance of that type of object in your workspace These objects are called controls Using the mouse, a control can be resized or moved

The Project Window This window allows you to select and open one or more forms that are used in a given project.

The Form Layout Window You may use this window to adjust the position of the form on the CRT screen. Clicking on the “X” will close this window and leave room for other things.

The Properties Window This window allows you to examine and modify the various properties of control objects in a program Properties govern the appearance and behavior of a control object They may be modified using the properties window, or by VB code

To Learn More More material on the VB window can be found in the textbook Using VB Help you can look under “properties window” or “project window”

Click on Contents under Help Finding Help in VB Click on Contents under Help

Finding Visual Basic Help Clicking on the pull down window marked “Active Subject” or “(entire Collection)” will cause a limit to be placed on the searches Move down to the “Visual Basic Documentation” line

Contents Page of Help Screen When the contents tab is clicked the various “volumes” of help are shown Clicking on the “+” sign opens a volume Clicking on the “-” sign closes it again

Click on Index under Help Indexed Data in VB Help Click on Index under Help

Indexed Data

Index Items Items shown in gray do not apply to the “Active Subset” Items shown in black do apply. Often the help is more sophisticated than the question

Click on Search under Help Searching VB Help Click on Search under Help

Searching

To Learn More An excellent search beginning is to look for a match to “hello visual basic” and just read the hits