User Tools

Site Tools


cs257:hw0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs257:hw0 [2014/01/15 14:43]
scarl
cs257:hw0 [2017/02/07 11:37] (current)
scarl
Line 1: Line 1:
 ==== Model for quickly testing single methods ==== ==== Model for quickly testing single methods ====
  
-Figure 1.1, page 12, shows a test class for the ''​celsiusToFahrenheit''​ method discussed in this section. The class ''​TemperatureConversion''​ contains the conversion method and a main method that calls it multiple times and outputs each result. +Below I've sketched a class that could serve as a test program for our ''​linearSearch''​ method, but with comments describing what they might do.  Other ways of writing this code are certainly possible; if you have a better way, go for it!
- +
-Below I've sketched a class based on Figure 1.1 that could serve as a test program for our ''​linearSearch''​ method, but with comments describing what they might do.  Other ways of writing this code are certainly possible; if you have a better way, go for it!+
  
 <​code>​ <​code>​
-  // Test class based on example from Figure 1.1, p. 12+  // Test class 
   public class SearchTest {   public class SearchTest {
    
Line 38: Line 36:
 That assumes there are no compiler errors after running javac, but we both know there probably will be. That assumes there are no compiler errors after running javac, but we both know there probably will be.
  
-If you are familiar with a Java IDE (such as Eclipse, BlueJ, or NetBeans) you may use them for this assignment, but for short assignments with just one class, the command-line method is simple and straightforward.+If you are familiar with a Java IDE (such as Eclipse, BlueJ, or NetBeans) you may use them for this assignment, but for short assignments with just one class, the command-line method is simple and straightforward. Eventually, though, you should wean yourself off gedit. It's kind of the low-end of editors; other editors include features that make programmers more productive, but at the cost of a higher learning curve.
  
 In any case, **all** programs you produce for this class __must work__ when run from the command line. In any case, **all** programs you produce for this class __must work__ when run from the command line.
cs257/hw0.1389818623.txt.gz · Last modified: 2014/01/15 14:43 by scarl