{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lectures 5,6 - Assignment+2+Lectures

Lectures 5,6 - Assignment+2+Lectures - Assignment 2...

Info icon This preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style 3/17/10 Assignment 2 Lectures January 25 and 27, 2010
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3/17/10 Programming Programming is a difficult and interesting process. Like database design, it is as much art as science. And like any art, it involves creating new things from existing things—no program is ever written completely “from scratch.” You wouldn’t say an artist was not original just because he didn’t invent
Image of page 2
3/17/10 Putting It All Together If I see farther than others, it is because I am standing on the shoulders of giants .” – Isaac Newton In these lectures, we will give you all of the building blocks needed to create the program required for assignment 2. We will also give you examples of solutions to very similar problems.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3/17/10 Assignment 2 In assignment 2, you will learn To make a simple and useful VB program How to use several different types of controls How to build long text strings using loops The basic elements of a Class In addition, the program that you create will be useful to you for most
Image of page 4
3/17/10 Assignment 2 Preview Here is approximately what the program will look like:
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3/17/10 What you need to know for assignment 2 Use of Labels, TextBoxes and Buttons Use of ListBoxes and ComboBoxes (this was covered in lab last Friday) Basic structure of a class—properties and constructors Use of string concatenation (&) Use of string functions vbCrLf and vbTab
Image of page 6
3/17/10 Visual Basic Basics Visual Basic code is generally easy to write and follow. You won't need to type many semicolons or squiggly Lines end when they end. When you hit the Enter key to start a new line, the last line is automatically finished. However, you can extend a line to display on two lines by adding a space and an underscore to the end (" _"). Note: We will look at the details of VB math Space and underscore
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3/17/10 Blank lines are ignored by the compiler. Many books recommend that you add lots of them. I don't. Comments begin with a single quote
Image of page 8
3/17/10 Outside of Subs and Functions, the order of code doesn't matter: You can put your Subs and Functions in any order, and declare variables at the top, in the middle, or at the bottom Midterm Material!
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3/17/10 Variable Scope Variables declared outside of Subs and Functions are visible (have scope) to all Subs and Midterm Material! * The word Procedure refers to both subroutines and functions.
Image of page 10
3/17/10 Two Equals in One VB uses the equals sign for both assignment (putting a value in a variable), and for comparison Midterm Material!
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3/17/10 Data Types Variables in Visual Basic have data types. This means that you must assign a data type to any variables that you use in your programs.
Image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern