| ME 135 - Spring 2005 - Lab 4 | ||||
| Lab 4 - Design and Implementation of Java Classes (for Signals, Noise, and Filtering) (Updated at 1415 on 02-16-2005) NOTES: You can do this lab from home (no hardware). Javadoc workaround for generating javadoc for mroe than 10 files at once: Read this. INSTRUCTIONS: You are starting from scratch -- there is no code written for you. In Netbeans, begin with a new project (Project >> Project Manager >> New). Create a new directory/folder that will contain all the files for this lab. Mount that directory in Netbeans. Right-click on the mounted directory and choose New >> Java Main Class (for your "User Class") or New >> Java Class (for your signal generator and filter classes). Useful library classes and methods (See the Java API online for details). You must import the class if you want to use it! Class name: java.lang.Math Includes basic math funcitions such as sin, sqrt, etc. Example of usage: double x = Math.sin(Math.PI / 2); Class name: java.util.Random Returns a double between 0.0 and 1.0 inclusive (uses the current time as a seed). Example of usage: Random myRandomNumberGenerator = new Random(); System.out.println("Here is a random number: " + RandomNumberGenerator.nextDouble()); |
||||