You are on page 1of 2

CIS 3309 Lab Assignment 1 - Chapters 1-3

Please read Chapters 1-3 and understand the material before Lab 1 begins. In the first lab we will start to use Visual Basic 2010 and learn about the integrated development environment (IDE). We will cover the first 3 chapters. You should not be too intimidated by the quick pace in lab. You should already have an understanding of object-oriented programming from Java. Programming in VB is similar and likely to be easier than Java because of the rich features offered in the IDE. Chapter 1 is a tour of the VB IDE. Chapter 2 shows forms and useful components that can be placed on them. NOTE: If you have a problem with the VS 2010 window that opens when you click on New Project you may need to look in your VS Options window. To do this, pull down the Tools menu and select the Options entry (the last entry in the Tools menu). Open the Projects and Solutions entry on the left side of this window and select General. Among other things: 1) note the location that VS is using to store your projects, and 2) make sure all the options on the right side (bottom) are checked. Chapter 3 shows how to place code in form components to perform operations and how to test the code.

The text web page is: http://www.murach.com/books/vb10/index.htm You can download pdf files of the chapters 2 and 3 if you do not have the text. Download the project files for the text at: http://www.murach.com/books/vb10/download.htm. The projects are in the Exercise starts directory. Note that once you download the files you need to go to your own Downloads directory, find the justdownloaded file (it should be highlighted), right click on this file (it should be named vb10_allfiles.exe and then click on Open the Containing Folder. In the containing folder find the file vb10_allfiles.exe and double click on it to run it. Your files will be stored in C:\Murach\VB 2010. If you are in the CIS lab, you will want to copy them to the G drive (and to your flash drive) using the same directory structure provided in the download. It is suggested that you first create a cis3309 directory and set aside a separate directory for each Lab (such as Labs 1-4, and each Project such as Tic-Tac-Toe and the ATM Project). Your lab assistant will have more to say on this in Lab. The lab assignment is to complete the exercises for the first 3 chapters in lab. I suggest you start with Exercise 1-1, then go to Exercise 2-1 and finally do Exercise 3-1, which is to be turned in. (Do not turn in Exercises 1-1 or 2-1 as 3-1 incorporates your work in these exercises. Be sure to do all the steps in each Exercise, as this is the only way you will gain some mastery over the Visual Studio IDE. In particular, do not omit Step 14 in Exercise 2-1. )

Please be sure to save your work periodically as you proceed and also back it up. You may wish to consider storing it in your Blackboard backpack and zipping it up and storing it on your flash drive. If you are going to zip an application in order to store it, BE SURE TO FIRST CLOSE Visual Studio. If you do store information on your flash drive be sure to copy it to a hard drive on your computer before working with the project. Be sure you note where your files are being saved by Visual Studio. If you follow the downloading directions on Murach's website, your file will end up in the following directory: C:\Murach\VB 2010\Exercise starts\Chapter nn or C:\Murach\VB 2010\Exercise starts\Chapter nn where nn is the number of the Chapter of the book from which the Exercise was taken. Keep your files in these directories while you are working on them. But don't forget to save them -- and take one copy with you. Tha actual address may depend on how you downloaded everything from the Murach Website. When you have completed Exercise 3-1 in the book, do the following: 1. In the Design View for your Invoice Total project, right click on the bolded project name near the top of the Solution Explorer window. Then click on the Compile tab on the left side of the new project options window. Make sure that all Compiler options have been turned on, including Option Strict and Option Infer. Leave the warning configurations as they are after you turn these options on. (See also, Chapter 4 of the text, pages 116 and 117). 2. Now rebuild your project. You should have gotten a number of errors. Hover over a couple of the expressions causing the errors and see if you can figure out what the problem is. Read up through page 125 in Chapter 4 if that will help. Pages 124 and 125 contain descriptions of some VB functions that may give you a hint as to that is wrong and a good idea how to fix the problems. It is a good idea to compile all components of your project with options EXPLICIT, STRICT, and INFER turned on, and with the Option Compare set to Binary. One way to ensure that this is handled properly is to ensure that for each component (class) you write, you always start with the lines OPTION STRICT ON OPTION EXPLICIT ON OPTION INFER ON The other option, COMPARE should always be set to Binary by default.

You might also like