Open main menu

CDOT Wiki β

Changes

Teams Winter 2011/team4/lab1

790 bytes added, 17:14, 27 March 2011
no edit summary
=Lab 1=
*[http://zenit.senecac.on.ca/wiki/index.php/Teams_Winter_2011/team4 Teampage]
 
==Tutorial==
** You can right click a java project or package and select run as (which gives numerous options in which to run your program)
** And you can also use the keyboard shortcut Ctrl+F11
 
===Debugging your programs===
===Evaluating snippets===
 
* TO evaluate a snippet, we must first create a scrapbook page
** This is done by File->New->Other->Java->Java Run/Debug->Scrapbook Page
* A window will pop up asking for both a folder and file name, enter these
* An editor will now pop up where you can enter your code snippets that you wish to have evaluated
* To view the results, right click on the snippet and select display
 
===Using the Java browsing perspective===
===Writing and running JUnit tests===
*Select a package in the package explorer, right click: New->JUnit Test Case
**Give it a meaningful name, Click Finish
*Ensure your class "extends TestCase"
*Create functions within your class, JUnit will automatically call them if they adhere to the naming conventions: function name = "test" + x
**public void testEquivs()
*Select your Java project in the package explorer, right click: Debug As->JUnit Test