complex.cpp

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Nestor Aguirre                                  *
00003  *   nfaguirrec@unal.edu.co                                                *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 // C++
00022 #include <fstream>
00023 using namespace std;
00024 
00025 // Project
00026 #include <SawComplex.h>
00027 
00028 int main(int argc, char *argv[]){
00029 
00030         cout << "****************************************************" << endl ;
00031         cout << "*                                                  *" << endl ;
00032         cout << "*             COMPEX NUMBER MANIPULATION           *" << endl ;
00033         cout << "*                                                  *" << endl ;
00034         cout << "*               Nestor Aguirre  2006               *" << endl ;
00035         cout << "*              nfaguirrec@unal.edu.co              *" << endl ;
00036         cout << "*                                                  *" << endl ;
00037         cout << "****************************************************" << endl ;
00038         cout << endl ;
00039 
00040         cout << "------------------------------------" << endl ;
00041         cout << "   Using cartesian representation   " << endl ;
00042         cout << "------------------------------------" << endl ;
00043         cout << endl ;
00044         SawComplex complex1(2.45, 2.36) ;
00045         cout << "A   = " << complex1 << endl ;
00046         cout << endl ;
00047         
00048         cout << "--------------------------------" << endl ;
00049         cout << "   Using polar representation   " << endl ;
00050         cout << "--------------------------------" << endl ;
00051         cout << endl ;
00052         SawComplex complex2(2.45, 2.36, SawComplex::POLAR_REPRESENTATION ) ;
00053         cout << "B   = " << complex2 << endl ;
00054         cout << endl ;
00055         
00056         cout << "------------------------------------" << endl ;
00057         cout << "   Using the association operator   " << endl ;
00058         cout << "------------------------------------" << endl ;
00059         cout << endl ;
00060         SawComplex complex3 ;
00061         complex3 = complex1 ;
00062         cout << "C   = " << complex1 << endl ;
00063         cout << endl ;
00064                 
00065         return EXIT_SUCCESS;
00066 }

Generado el Sun Jul 22 18:05:41 2007 para SAW por  doxygen 1.5.1