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
cs257:hw0 [2014/01/15 15:06]
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 {
    
cs257/hw0.1389820001.txt.gz · Last modified: 2014/01/15 15:06 by scarl