COMP125

FUNDAMENTALS OF COMPUTER SCIENCE

Semester 3, 1999

ASSIGNMENT 1 SOULTION

"BIORHYTHMS"

Due Date: 1st December 1999, 12:00 Noon.


WARNING!!!
I'm not responsible for any problems caused by this assignment solution.
You can get no mark for this assignment or even worse, fail this semester, dropped out from your school, etc.
Download or copy this solution with your own risk.

Note: This solution is not the official solution and not the only solution for the Assignment 1.


This solution consists of 3 classes :

You also can download the zip archive for this assignment solution.

Frequently Asked Question.

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?

Why the answer is different from Dave's program (for the same input, this program gives 20529 days)?

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.


Last Modified: Sunday, November 21, 1999

Back To COMP125 Page.
Back To Nozzle's Homepage.

This WWW Page is Copyright © 1999 Nozzle