Semester 3, 1999
ASSIGNMENT 1 SOULTION
Due Date: 1st December 1999, 12:00 Noon.
Note: This solution is not the official solution and not the only solution for the Assignment 1.
You also can download the zip archive for this assignment solution.
What is each class do?
BIORHYTHM
This class acts as the root class. Input from user (ie. ask the date) and output to user (ie. display the result) are controlled by this class.
The calculation for physical cycle, emotional cycle, and intellectual cycle are happened in this class.
DATE_STRING_TO_DATE
Basically, this class takes a date input as a string in format dd/mm/yyyy and it convert the string into date, month, year which each of them is integer.
CONVERT_TO_DAYS
The function of this class is to get the number of days from 0/0/0 to inputed date. As an example, if the inputed date is 18/10/1943,
then the function "get_days" in this class will give the number of days from 0/0/0 to 18/10/1943.
How this "thing" work?
Hey, I am not David, I am Nozzle. Ask David if you want to know why it's different. I have check other programs such as Vulcan Biorhythm 97 and BioWin 4. Both of them give the same answer like my program for the same input.
How do you calculate the different between the first date and the second date?
The easiest way which I can think of is calculating the number of days from 0/0/0 to the first date and the number of days from 0/0/0 to the second date. Then substract the second to the first one.
Why you make this solution?
First of all, perhaps because I don't have anything to do since I only take one subject this semester. I also want to develop my skill in programming Eiffel and help students who take COMP125 in SIBT.
Does the lecturer know about this site?
Yes, I have email him about this site. That's why you can't just copy all the solution in here and give it to him without changing anything. After all, the purpose of this solution is giving you an idea on how to make the Biorhythm program.
Back To COMP125 Page.
Back To Nozzle's Homepage.