![]() |
Aggregation Mini-Lecture: Day 1You've been asked by your local veterinarian to write a program for pet owners to help them know how to care for their new pets. The owner will select the type of pet and the type of care, press OK and they will be told what to do. You ask a few questions, find out that the vet only deals with cats and dogs, and go off to write the program. Here's the form: Here's the code (opens new window). Based on what type of care the animal needs and whether it's a cat or dog, the owner is informed appropriately: You compile and test and it works great! You're ready to package it up for the vet, but then you remember what you learned in your VB courses, oh, yeah, I'm not supposed to code everything in the form. That's right. Hmmm. I'm supposed to use a separate class module in case I want to reuse this code later on. Or if I need to fix a bug...that way I can just issue a service patch instead of reinstalling the whole program... To be continued... Alrak's Course Resources ©2002-2007 Karla Carter. All rights reserved. This material (including, but not limited to, Mini-lectures and Challenge Labs) may not be reproduced, displayed, modified or distributed without the express prior written permission of the copyright holder. For permission, contact Karla. |