====== Lab 1 ====== ~~NOTOC~~ ** CS203 ** \\ ** Spring 2013 ** \\ ** Jan 25 ** ===== Goals ===== * Set up your course directory and protect it * Play with Netbeans, our IDE for this semester * Compile and run a Java program from the command line * Play with the BlobWorldFun project we saw in class this week * Ensure access to the tester and world libraries we'll be using this semester * Ensure you can successfully submit your assignment \\ \\ ===== Setup ===== Note that these instructions are less detailed than they were in 101/102. That's meant as a compliment :-), but don't hesitate to ask me or one of the coaches any questions! - Create //**and protect**// a ''cs203'' course directory under your home directory - Show Marc or one of the coaches your protected course directory before proceeding ===== NetBeans Activities ===== - Copy the BlobWorldFun project from ''~cs203/labs/'' to your course directory - Launch Netbeans, and open your copy of the BlobWorldFun project - Mouse over the button bar and explore until you find the "Build Project", "Clean and Build Project", and "Run Project" buttons - Clean and build your project - Run BlobWorldFun several times, playing with arrow keys and mouse clicks to control the blob, and color abbreviation keys to change the color of the blob - Intentionally end the game by guiding the blob into the black hole, as well as each of the four walls - Read through the code, play with the code, see what you can change about BlobWorldFun ===== Java command line Activities ===== How to compile and run a Java program with tester library from the command line. 1. Open the terminal window. 2. cd into your course directory 3. Copy the ''Shapes'' project to your course directory: \\ cp -r ~cs203/labs/Shapes ./ 4. cd into your newly copied Shapes directory: \\ cd Shapes 5. To compile your program type into command line: \\ javac -cp .:/home/cs203/jars/tester.jar *.java 6. To run your program type into command line: \\ java -cp .:/home/cs203/jars/tester.jar tester.Main If all goes well, you should see as the last few lines of output: Ran 18 tests. \\ All tests passed. \\ Issued 5 warnings of inexact comparison. \\ --- END OF TEST RESULTS --- ===== Submit your work ===== - When you've had enough fun, submit //your choice// of project using the new form of the submit203 script: * ''submit203 lab1 BlobWorldFun'' * ''submit203 lab1 Shapes'' - Logout and have a good weekend