I.	Title
Multi-Media Calculator
II.	Reference:

III.	Program description
(i)	Why this Calculator?
There are some useful programs in our daily life. We can use media player to play some music, access WWW with browser, or do some simple calculate with the calculator. But these programs are separate ones. We try to integrate these useful tools, to be a useful agent program.

(ii)	Platform
This program uses Microsoft Windows as its executing platform. Microsoft Windows is the most popular OS on PC. It makes our program can be run in most personal computer.

(iii)	Development tool
We use Borland C++ Builder as our development tool. This is because C++ builder using C++ as language, and it is RAD tool. This help us to develop powerful program in a short time.

IV.	Program Component
This program is composed by three different sub system:
(i)	Clock system
The clock is located left top of whole window, display in the order of "hour", "minute", "second". This clock is synchronous with the system times. If user want to adjust time, all he has to do is change his system time.
 
Component: "TTimer", "TPanel", "TLabel"
a.	Set TTimer's interval property to 10, that means 10ms, and enter the code in the "OnTimer" event.







 
K
b.	The code above will get the system time, store to the variable T. After analysis T, set to the corresponding Labels.

(ii)	Media player system
Media player system is located left bottom of the window. Composed by a tool bar and a "open file" button. After click the "open file", a dialog appears, user can choose the file he wants to play, and press "OK". This program can play many kinds of media files, such as: *.mpeg, *.avi, *.wav, CD, *.mp3, etc.
In this system, we use the "opendialog" component. The component is special in VCL, we can move it, set its property in design time, but we can't see it in run time..

Components : "TMediaPlayer", "TButton", "TopenDialog"
a.	Insert follow codes in the OnClick event of TButton:












These codes above call the "Execute" function of "TOpenDialog" component when "TButton" is clicked. This function call create a dialog box. User can choose the file they want to play it. "TOpenDialog" will return the file name of user selected.
b.	When we get the file name the user selected, we send the file name to "TMediaPlayer", and call the "Open" function, "TMediaPlayer" will play the selected multi-media files.

(iii)	Calculator system
Calculator located on the right of the window. This system can provide user a simple calculating tool.
Components : "TButton", "TEdit" 
a.	Arranging the TButton to their own position, we can roughly divide these buttons. 
b.	NUMBER button, means 0~9, when these button was clicked, follow codes are executed.






Codes above means when button was clicked, send the number they means to the "TEdit" component.
c.	DECIMAL POINT button, first, we have to judge if the button was pressed, if it has been pressed, then do nothing.
d.	OPERATOR button, when these buttons was pressed, program have to store the previous number user input into a variable, and record the operator user input. Besides, to prevent user from pressing duplicated operator button, after one operator button was pressed, the button state must set to "disable".













e.	EQUAL sign: when users press this button, program have show the result on 
the TEdit component. So we calculate the result by the operator input by user.















	f. CLEAR button : clear all variable, operator.

V.	Result
VI.	Conclusion
