/** * Fail PolTest.java * @author Jaanus Poial * @version 0.3 kevad 99 */ //======================================================================= // Na"ide polu"noomist //======================================================================= public class PolTest { // pohiprogramm main static public void main (String[] argumendid) { System.out.println ("Algus"); Polynoom p = new Polynoom(); p.init(); YksLiige y1 = new YksLiige(); y1.init (new Kordaja (-1), new Astendaja (2)); System.out.println ("Yksliige1: " + y1); p = (Polynoom)p.summa (y1); System.out.println ("Polynoom1: " + p); YksLiige y2 = new YksLiige(); y2.init (new Kordaja (1), new Astendaja (0)); System.out.println ("Yksliige2: " + y2); p = (Polynoom)p.summa (y2); System.out.println (" Summa p: " + p); System.out.println ("p + p on: " + p.summa (p)); System.out.println ("p * p on: " + p.korrutis(p)); System.out.println ("p tuletis: " + p.tuletis()); System.out.println ("p*(p+p') : " + p.korrutis (p.summa (p.tuletis()))); System.out.println ("p==pkloon: " + p.equals(p.clone())); System.out.println ("p==p' on: " + p.equals(p.tuletis())); System.out.println ("p on ikka: " + p); System.out.println ("Lopp"); } // main() lopp } // PolTest lopp //=========================================================== // faili lopp //===========================================================