Thursday, February 3, 2011

Weather and Microwaves

Because the weather conditions we are currently experiencing are less than optimal, we will adjourn early this evening. I want to be sure that everyone makes it home safely.

Road conditions in some areas are treacherous. I was having trouble getting here via my normal route. Please be very careful going home.

This week we will continue to work on our Microwave assignment. It is due next Thursday.

Oh, and one last thing - since I will not be lecturing tonight (in an effort to get you home sooner), I did not want you to miss out on the inspiring quotes at the beginning of each of our text's PowerPoint presentations, so here are a few that I found to hold you over:

Weather forecast for tonight:  dark.  ~George Carlin


Dear beautiful Spring weather, I miss you.  Was it something I said?  ~"Skipper" Kim Corbin

The snow doesn't give a soft white damn whom it touches.  ~e.e. cummings



Weather is a great metaphor for life - sometimes it's good, sometimes it's bad, and there's nothing much you can do about it but carry an umbrella.  ~Terri Guillemets

Regards,
- Nicole

Thursday, January 27, 2011

Chapter 10: Nuke it! (Microwave Oven Application)

This week we will finish discussing classes as they are outlined in Chapter 10 of our text.


To help you get started assembling the files for this project I will outline the files needed and I have attached the partially completed MicrowaveOven.vb file with code for the microwave interface. 

When I chose this assignment, I had envisioned separating the main functionality of the Microwave Oven application from the interface. I was expecting to see a Time class,  a MicrowaveOven class, and another file that would handle the button clicks and display, etc, for the microwave interface. The book's example has only two files, a Time class file (Time.vb) and a MicrowaveOven interface file (MicrowaveOven.vb). 

Here is the partially complete MicrowaveOven.vb file. You will need to complete the code for buttons 3-9, and 0, and the clear button. If you feel ambitious and would like to make an attempt at separating some of the functionality into a re-useable "MicrowaveOven" class (i.e. another file, containing a Public MicrowaveOven class), you are welcome to do so.

Below is a screenshot of the microwave interface, your microwave can be designed differently, if you prefer, this is just to give you an idea and help you get started.

 

The requirements for the functionality of the microwave are detailed in Exercise 10.11 (The Microwave Oven Application) on page 482. This assignment is due in two weeks on Thursday, February 10, 2011. Please zip and upload all associated files in Blackboard before class Thursday, February 10, 2011.


Thursday, January 20, 2011

Optional Assignment: 10.2 Time Class Case Study

If you would like some extra practice, you can work through the Time Class Case Study example on pages 419 - 424.

This example demonstrates the Time class and the graphical user interface test program that we discussed today.

After a successful build, zip and submit your files on Blackboard by Thursday, January 27, 2011.

Thursday, January 13, 2011

Using LINQ to Query an Array

Set up and build the "Using LINQ to Query an Array of Employee Objects" example on pages 403-5. 

Use the Chapter 9 files from the Visual Basic® 2008 How to Program Example Programs website. Use the sample program for Figures 9.3 and 9.4. You will have both the employee.vb and the LINQWithArrayOfObjects.vb files. 

The employee.vb file is the Employee class, and the LINQWithArrayOfObjects.vb is the main program that is being used to test the class and using LINQ.

  1. Once you have successfully built the program, add an additional LINQ Query (like the one used to filter the salary results on line 20). 
  2. Use the two queries to display salaries above $5000 and below $5000. 
  3. This means you will need to change the existing salary query as well.  
  4. Add 5 more employees with varying salaries.
  5. Build and debug the program.
Once you have successfully built the program, zip your files and submit them in Blackboard. 

This assignment is due Thursday, January 20, 2011.