CSC 216/s08/own career: Difference between revisions
No edit summary |
No edit summary |
||
Line 39: | Line 39: | ||
assertEquals(Calculation.add(),4); | assertEquals(Calculation.add(),4); | ||
} | } | ||
public void testAddNegative() { | |||
Operations Calculation = new Operations(5, -2); | Operations Calculation = new Operations(5, -2); | ||
assertEquals(Calculation.add(),3); | assertEquals(Calculation.add(),3); |
Revision as of 01:50, 27 March 2008
Formatting Conventions
Java Code will look like this.
PseudoCode will look like this.
Commands will look like this.
Tip: Tips will look like this.
A string of menu commands will be marked as follows:
File => Save As
A string of keys will be marked as follows:
[Ctrl]+[Alt]+[Delete]
Instructive Graphics Will appear as follows:
Using Eclipse with JUnit for WebCAT
This activity will guide you through basic usage of the Eclipse IDE and JUnit for use with Webcat. Please have a computer available on which you may install Eclipse IDE. Also, please note that the following conventions will be used to draw attention to different parts of the article.
The problem
WebCAT is an software developed by Virginia Tech that allows you to submit your Java programs and have them graded in near-real-time. WebCAT tests your programs using something called JUnit. Eclipse is well integrated with JUnit, and provides an easy to use interface for evaluating your programs with JUnit. The challenge for this activity is to build a simple calculator that would pass the tests on WebCAT which would check the calculator using the following JUnit test cases:
public void testAdd() { Operations Calculation = new Operations(2, 2); assertEquals(Calculation.add(),4); } public void testAddNegative() { Operations Calculation = new Operations(5, -2); assertEquals(Calculation.add(),3); }
Participants and props
How many students will participate? What else do you need (e.g., old tennis ball, Powerpoint slides, software).
The script
Describe how to do your exercise.
Images
Images Below: