*

ActiveX2: Challenge Lab Week 1

The Challenge Lab for Week 1 will be in multiple parts.  This is Part 1.

Background

If you were able to attend the Synchronous Event in the first class (or were curious and downloaded the files used...) you are familiar with the Biorhythm calculator component used as an example.  If you are scratching your head and saying, "huh?", Here is a link* to where you can download a  zip file of the project files (make sure you unzip to its own folder).  The Biorhythm calculator takes in your birth date and another date (which by default is today's date) and whirls and spins and churns and produces dates for your next best and worst emotional, physical and intellectual days1

In the Bio group project there is the ActiveX DLL project, Roswell, and a Standard EXE testing project, BioTest.  Roswell has one class module, Bio, which has some properties and methods and an event.  Bio is designed to be called from either a desktop app (like BioTest), or an Active Server Page, or a Windows Scripting Host VBScript file (included in the zip file - it creates an Outlook Calendar appointment for the next worst intellectual day of whomever gets entered into the input boxes - you need to remember to EDIT the file, not just double-click, incidentally).  As such, its two date-data properties are done as variants (as opposed to the more restrictive date) so that type checking could be handled by the component instead of relying on the user/client programmer to do due diligence in data validation (say that three times fast...).

"Good Morning, Mr. Phelps..."

You have been asked to incorporate the Outlook Calendar appointment functionality into the Roswell.Bio component.  (Make sure you look carefully at the code in the VBScript file (biotest.vbs) to see what information it takes in.)  The customer would like the option to make all six appointments together or selectively choose which days to note (from a programming perspective, not an end user decision).  The customer specifically asked that there be a way to let the end user know that the appointment(s) had been made, and, if singly made, which ones. (hint: what does the material for Lesson 1 deal with...)

This post will self-destruct in...oh, wait, no it won't....

There are at least two ways you can accomplish this task (and one of them involves that troublesome little Chapter 5 of the coursebook - I know, I know, post the rest of the mini-lecture... :-).  Here are the zip files of code projects for what I would do using each method:

Download Proposed Solution 1*

Download Proposed Solution 2*

This doesn't mean only my way is right; in fact, I'm sure there is something flawed in my way because I am not perfect, but, hey, I'm all you've got!  (And my next worst intellectual day isn't until the 21st...)

Please post your zipped project files here in this thread.  You'll get the Tshirt (of course!) and my comments.  But, hey, that's why you're here!! (Back away from the keyboard, Karla....)


1Biorhythms - circadian cycles expressed by sine waves that start at zero on the day you are born - are not an exact science and probably should be viewed with amusement more than anything. According to a recent Google search, numerous sites exist where you can check out your biorhythmic compatibility with celebrities, for instance.  However, It is rumored that a major airline uses biorhythms to schedule pilots - which has produced positive results - so maybe there is something to it.  And, to be balanced, check out the Skeptic's Dictionary entry for biorhythm.

Please feel free to take the code and use/abuse/modify it.  Having read somewhere that the physical cycle is 23 days, the emotional cycle 28 days and the intellectual cycle 33 days, I came up with my particular algorithm whilst sitting through an NT 3.51 course years ago (I think it was 1996, in fact).  I know nothing about printing, but hey, I've got this nifty code...



Internet Content Rating Association

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.