Lab 1 - Assembly

Read in the user's name, and the display "Hello X" where X is the users name.

You might find it useful to modify the "gimme cookie" example from lecture.


Lab 2 - Memory and C++

Install the Visual Studio 6.0 IDE by following the directions in this viewlet.  Note, you only need to download the first disc from MSDNAA/ELMS if you don't already have the disc.

Using the "hello world" sample in the viewlet as a template, type in the following code and report what the result to the screen is.  Discuss what is going on in memory and why you see what you see in the output; your discussion should include a diagram of memory similar to what we showed in the memory lecture.

Note - each cell of memory must include the variable name, the address of the memory, and the value held by that space in memory.

The C++ code to include in "main" (in between the curly brackets) is:

int i;
int* j;
int* k;

i = 42;
j = (int*)i; // the (int*) makes j accept i
k = &i;

cout << i << endl;
cout << &i << endl;
cout << j << endl;
cout << k << endl;
cout << *k << endl;


Lab 3 - Paragraph Count

Write a simple VBA program for Word that displays how many paragraphs the document contains.


Lab 4 - ASP.NET DataGrid

Create an ASP.NET page that shows a table populated with data from a MS Access database of your choosing.  Your page must allow the user to add a new record to the database and have that addition be persistent (i.e. it must actually get added to the permanent database).

Submit your code as well as your database, making the database connection local (i.e. it should connect assuming the DB is in the same directory as your ASPX web page), so that I can grade it.

Use default.aspx, default.aspx.cs, and the books.mdb Access DB files from lecture (6/15) to get started on this lab (though you don't have to use this DB if you want to use another).


Lab 5 - PDA Images

Your task in this lab is to create a simple application for the PocketPC that allows you to randomly display images.  To accomplish this, select the new project (Visual C#, then Smart Device, then Pocket PC 2003) from within Visual Studio 2005 Pro.  See below for a sample of how to get to this option within the IDE.

Now your task is to:

  1. Place an ImageList on the form
  2. Add some images to the ImageList's Images collection
  3. Add a PictureBox onto the form and resize it to take up most of the form
  4. Add a button and change its text to read "Next Image"
  5. Add code that when the button is clicked, a new random image will be selected.  The following code should help you achieve this:

    Random r = new Random();
    int
    i = r.Next(imageList1.Images.Count);
    pictureBox1.Image = imageList1.Images[i];

Then when you run it, the PocketPC emulator should run.  If your application doesn't start automatically, browse to "START | Programs | File Explorer" and then go to "My Device | Program Files | APPLICATION" where APPLICATION is the name of the program you just created.  Click on this application to see it run (as seen below).