1 / 16

Introduction to Computer Programming (using MSFT’s Visual Basic Express Edition)

Introduction to Computer Programming (using MSFT’s Visual Basic Express Edition). January 2009 Ted S. Anderson. Course Outline: Deck 1. Objectives Hierarchy of Computer Languages How I will teach this course? Tools Used to Develop Code MSFT Visual Basic 2008 Express Edition

dillian
Download Presentation

Introduction to Computer Programming (using MSFT’s Visual Basic Express Edition)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Computer Programming (using MSFT’s Visual Basic Express Edition) January 2009 Ted S. Anderson

  2. Course Outline: Deck 1 • Objectives • Hierarchy of Computer Languages • How I will teach this course? • Tools Used to Develop Code • MSFT Visual Basic 2008 Express Edition • Why choose VB.NET? • Class Book – Visual Basic Express by Mike McGrath • How I will Teach This Course? • A Program Looks Like: • Statement Execution • Chapter 1 – Getting Started • Chapter 2 – Setting properties • Chapter 3 – Using controls • Constructs: Intro to Computer Programming

  3. Objectives: Course: • Introduce you to computer programming via MSFT’s VB.NET: • Design • Coding • Test Personal: • Spark your interest in problem solving and engineering. • Maybe become an “intern” or employee for BCGOV • Is the USA losing its Engineering Talent? By the end of the Course: • Be able to write a small program using Visual Basic. Intro to Computer Programming

  4. Hierarchy of Computer Languages High Level Visual Basic Pascal Java C++ C Fortran ... Assembler Machine Code Micro Code Interpretive Compiled Low Level Hardware Intro to Computer Programming

  5. Tools Used to Develop Code? • Command Line Interface (CLI): • ASCII Editor • Compiler • Linker • Executable (to run) • Instead: • IDE – Integrated Development Environment • WYSISYG – what you see is what you get! • Instead of command line interface • In Java world – Eclipse • All in One, Program Shell that contains: • Editor • Compiler • Debugger • Run-time environment Intro to Computer Programming

  6. Visual Basic 2008 Express Edition • Free from MSFT Website • Installed on BA’s PCs in Computer Lab • Is an IDE: • Interactive Design Environment (MSFT) • Integrated Development Environment (wiki) • http://en.wikipedia.org/wiki/Integrated_development_environment • It Is a tool!! • NOT the language! Intro to Computer Programming

  7. Why choose VB.NET? • Basic is well “basic” • Hopefully, should be easier to learn. • Tool is free to download from MSFT website. • Many Beaufort County IT shops have standardized on MSFT products. • You can get a job now if you know this language -> ~$20/hour. • Used for both Windows and Web. Intro to Computer Programming

  8. Class Book • “Visual Basic Express” -> Mike McGrath • Goal -> get through the book in 1 quarter • Other References: • SAMS “Teach Yourself Visual Basic 2008 in 24 hours” -> CD included • MSFT “Visual Basic 2008 Step by Step” • VB.NET Reference Sheet Intro to Computer Programming

  9. How I will teach this course? • Slides – that I have created. • Go through the Book exercises in class. • Programming “Constructs” • Think of a programming “construct” as a tool in your programming toolbox used to construct a program. • First, I will introduce a programming “construct” in general terms, independent of any specific language. • Then, we will use this “construct” within the confines of MSFT Visual Basic Express Edition. • Disclaimer – I am NO expert in Visual Basic • I am learning the tool just like you! • However, I do consider myself a modest expert into the discipline of S/W Engineering. • Languages: Fortran, Pascal, C/C++, some Java Intro to Computer Programming

  10. A Program Looks Like: Start of Program Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ‘Declare a new String variable. Dim msg As String ' Assign a text value to the bariable. msg = "Hello World this is Visual Basic 2008 Express Edition!“ ' Display the variable value. MsgBox(msg) End Sub End Class Variable Declarations Variable Assignment End of Program Intro to Computer Programming

  11. Statement Execution: From Top To Bottom Line by Line From Left to Right Language Made up of ASCII “Key Words” , symbols and rules Program is stored in an ASCII “flat-file” that is “interpreted” and translated into machine code. Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Declare a new String variable. Dim msg As String ' Assign a text value to the bariable. msg = "Hello World this is Visual Basic 2008 Express Edition!“ ' Display the variable value. MsgBox(msg) End Sub End Class Intro to Computer Programming

  12. Chapter 1 – Getting Started • Page 12 – Exploring the IDE • Page 14 – Starting a new project • Page 16 – Adding a visual control • Page 18 – Adding functional code • Page 20 – Saving projects • Page 21 – Reopening projects Intro to Computer Programming

  13. Chapter 2 – Setting Properties • Page 24 – Form properties • Page 25 – Meeting the property editor • Page 26 – Editing property values • Page 28 – Coding property values • Page 30 – Applying computed values • Page 32 – Applying user values • Page 34 – Prompting for input • Page 36 – Specifying dialog properties Intro to Computer Programming

  14. Chapter 2 - Summary • Common Controls: • Button common control is a simple event driven method. • Label controls merely display text does not allow user input. • Textbox controls both display text and allow user input. • Functions: • InputBox allows user input to be assigned to any property. • Unlike a MsgBox statement, a call to the InputBox should always assign the value which will be returned. • Visual Basic is NOT case-sensitive. • Data Values: • Initialized at runtime. • Changed during execution time. Intro to Computer Programming

  15. Chapter 3 – Using controls • Page 40 -Tab order • Page 41 - Using Button • Page 42 - Using Textbox • Page 43 - Using ComboBox • Page 44 - Using Label • Page 45 - Using PictureBox • Page 46 – Using ListBox • Page 48 - Using CheckBox • Page 49 - Using RadioButton • Page 50 - Using WebBrowser • Page 52 - Using Timer Intro to Computer Programming

  16. Constructs: • Data • Atomic Data Types • User Defined (Objects) • Variables • Used to hold (i.e. address) data; • Naming • Assignments • Types • Definition vs. Declaration? • Operators Intro to Computer Programming

More Related