![]() |
IOBit Software
|
|
|
||||||
| Programming Place to discuss programming including HTML, Java, C++, MySQL and others. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
package toy;
import java.io.*; public class MathExploreToy{ /**create*/ public class MathExploreToy(){ } static void test { test E(); testPI(); testAbs(); } static void betterTest(){ testinAbs(); } static void betterTest(){ testIntAbs(){ } static void test E System.out.println("Testing untuk math.E"); System.out.println("Math.E= "+Math.E); System.out.println(""); } static void test PI(){ System.out.println("Testing untuk math.PI"); System.out.println("Math.PI = "+Math.PI); System.out.println(""); } static void testAbs(){ System.out.println("Testing untuk Math.abs()"); System.out.println("Math.abs(-23.7)="Math.abs(-23.7)); System.out.println("Math.abs(0.0)="Math.abs(0.0)); System.out.println("Math.abs(23.7)="Math.abs(23.7); System.out.println("Double.MIN_VALUE = "+Double.MIN.VALUE); System.out.println("Math.abs(Double.MIN_VALUE) ="Math.abs(Double.MIN_VALUE)); System.out.println("Math.abs(-Double.MIN_VALUE) ="Math.abs(-Double.MIN_VALUE)); System.out.println("Math.abs(Double.MAX_VALUE) ="+Double.MAX_VALUE); System.out.println("Math.abs(Double.MAX_VALUE) ="+Math.abs(Double.MAX_VALUE)); System.out.println("Math.abs(-Double.MAX_VALUE)="+Math.abs(-Double.MAX_VALUE)); System.out.println(""); } static void testIntAbs(){ System.out.println("cara pengujian yang lebih baik mendukung otomatisasi"); System.out.println("Testing untuk Math.abs() bagi bilangan bulat"); if (Math.abs(-23) !=23)System.out.println("Math(-23)::Error Hasil harus 23"); else System.out.prinln(Math(-23):: Correct!"); if (Math.abs(0) !=0)System.out.println("Math(0)::Error Hasil harus 0"); else System.out.prinln(Math(0):: Correct!"); if (Math.abs(23) !=23)System.out.println("Math(23)::Error Hasil harus 23"); System.out.println("integer.MIN_VALUE) = "+integer.MIN_VALUE); System.out.println(Math.abs(Integer.MIN_VALUE) ="+math.abs(Integer.MIN_VALUE)); System.out.println("integer.MAX_VALUE) = "+integer.MAX_VALUE); System.out.println(Math.abs(Integer.MAX_VALUE) ="+math.abs(Integer.MAX_VALUE)); if (Math.abs(Integer.MIN_VALUE) != (-Integer.MIN_VALUE)) System.out.println("Math(Integer.MIN_VALUE) :: Error!"); else System.out.println("Math(Integer.MIN_VALUE) :: Correct!"); if (Math.abs(Integer.MIN_VALUE) < 0) System.out.println("Math(Integer.MIN_VALUE) :: Error! hasil harus > 0"); else System.out.println("Math(Integer.MIN_VALUE) :: Correct!"); it not yet finish but i feel comlicated, can i ask somebody? this programm need package or not? |
| Sponsored links |
|
|
|
#2
|
|||
|
|||
|
this day i will try to make a package
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TrueCrypt.... is complicated... | dannskunk | Software | 4 | 08-13-11 21:02 |
| This is so **** complicated ....... | nerble | Malware Removal | 9 | 12-07-10 20:28 |
| complicated need some help getting head round | jratcliffe | Networking | 2 | 10-16-09 03:47 |
| Complicated Issue | reddy123456 | Networking | 2 | 01-05-09 07:18 |
| Malware removal looks complicated | joyrider6482 | Majorgeeks Welcome Center | 8 | 08-17-08 13:53 |