<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE200%3AMarch_18</id>
	<title>SE200:March 18 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE200%3AMarch_18"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE200:March_18&amp;action=history"/>
	<updated>2026-06-15T09:14:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=SE200:March_18&amp;diff=1471&amp;oldid=prev</id>
		<title>Mark: 5 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE200:March_18&amp;diff=1471&amp;oldid=prev"/>
		<updated>2008-11-03T05:08:24Z</updated>

		<summary type="html">&lt;p&gt;5 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Some Information==&lt;br /&gt;
&lt;br /&gt;
Hello&lt;br /&gt;
&lt;br /&gt;
This is to announce the second shadow class for this year, hosted by SESA. Based on feedback from our various spies in your classes , we will be running through a brief overview of the basic concepts people still seem to struggle with, followed by the topics of constructors, inheritance etc.&lt;br /&gt;
&lt;br /&gt;
What: 2nd Shadow Class on JAVA&lt;br /&gt;
When: Tuesday, 18th of March, 1pm to 2pm&lt;br /&gt;
Where: Engineering Lab 1.312, Level 3 - where the engineering cafe is.&lt;br /&gt;
Cost: FREE (members allowed only!)&lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t worry if you haven&amp;#039;t signed up already! Come along to the class and sign up there and collect your membership card. Its $5 to sign up for the whole year.&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
SESA Exec Team&lt;br /&gt;
&lt;br /&gt;
==Code from the Vehicle project==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Main.java&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
 package vehicles; &lt;br /&gt;
 &lt;br /&gt;
 public class Main { // This class does not need to be called &amp;quot;Main&amp;quot;, it is just convenient.&lt;br /&gt;
 &lt;br /&gt;
 	/**&lt;br /&gt;
 	 * @param args&lt;br /&gt;
 	 */&lt;br /&gt;
 	public static void main(String[] args) {&lt;br /&gt;
 		// TODO Auto-generated method stub&lt;br /&gt;
  		Vehicle glensBike = new Vehicle(2, &amp;quot;Glen&amp;quot;);&lt;br /&gt;
 		System.out.println(&amp;quot;Glen&amp;#039;s bike has a &amp;quot; + glensBike.engineBrand +&lt;br /&gt;
 				&amp;quot; engine!&amp;quot;);&lt;br /&gt;
 		glensBike.go(200);&lt;br /&gt;
 		System.out.println(&amp;quot;Glen&amp;#039;s bike has a mileage of &amp;quot; + glensBike.getMileage());&lt;br /&gt;
 		System.out.println(&amp;quot;Glen&amp;#039;s bike has a mileage of &amp;quot;&lt;br /&gt;
 				+ glensBike.getMileage());&lt;br /&gt;
 		//Add Glen as a passenger&lt;br /&gt;
 		glensBike.passengers.add(&amp;quot;Glen&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Vehicle.java&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 package vehicles;&lt;br /&gt;
 &lt;br /&gt;
 import java.util.Vector; //Required to use the Vector class&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * This class represents a vehicle.&lt;br /&gt;
  * It is sweet.&lt;br /&gt;
  * @author grob083&lt;br /&gt;
  *&lt;br /&gt;
  */&lt;br /&gt;
 public class Vehicle { &lt;br /&gt;
 	&lt;br /&gt;
 	int noOfWheels; //Represents number of wheels.&lt;br /&gt;
 	String engineBrand;&lt;br /&gt;
 	private int mileage;&lt;br /&gt;
  	Vector&amp;lt;String&amp;gt; passengers; //Set to null by default.&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * Constructor for a Vehicle. =O&lt;br /&gt;
 	 */&lt;br /&gt;
 	public Vehicle(int wheels, String engineBrand) {&lt;br /&gt;
 		this.noOfWheels = wheels;&lt;br /&gt;
 		this.engineBrand = engineBrand;&lt;br /&gt;
 		this.mileage = 0;&lt;br /&gt;
 		this.passengers = new Vector&amp;lt;String&amp;gt;(); //Not null anymore, we can&lt;br /&gt;
 		//use it safely now.&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public void go(int distance) {&lt;br /&gt;
 		// We use this to make our vehicle go!&lt;br /&gt;
 		//Commenting ftw!&lt;br /&gt;
 		this.mileage += Math.abs(distance);&lt;br /&gt;
 		//Math.abs() is built into Java and available automatically&lt;br /&gt;
  	}&lt;br /&gt;
 	&lt;br /&gt;
 	public int getMileage() {&lt;br /&gt;
 		//returns our mileage.&lt;br /&gt;
 		return this.mileage;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TestVehicle.java&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 //Junit Test Class&lt;br /&gt;
 //Conventionally named TestXXX where XXX is the class it tests.&lt;br /&gt;
 &lt;br /&gt;
 //To get this working you will need to click on the lightbulb beside&lt;br /&gt;
 //the error message and click &amp;quot;Add Junit to the build path&amp;quot; and&lt;br /&gt;
 // import &amp;quot;TestCase&amp;quot;.&lt;br /&gt;
 package vehicles;&lt;br /&gt;
 &lt;br /&gt;
 public class TestVehicle extends TestCase {&lt;br /&gt;
 	Vehicle gBike = null; //This is the bike we will be testing. &lt;br /&gt;
 	&lt;br /&gt;
 	public void setUp() {&lt;br /&gt;
 		gBike = new Vehicle(2, &amp;quot;Glen&amp;quot;);&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public void tearDown() {}&lt;br /&gt;
 	&lt;br /&gt;
 	public void testGlen() {&lt;br /&gt;
 		assertEquals(gBike.noOfWheels, 2);&lt;br /&gt;
 		assertTrue(true);&lt;br /&gt;
 		assertFalse(false);&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	public void testAnotherTest(){&lt;br /&gt;
 		assertEquals(gBike.engineBrand, &amp;quot;Yamaha&amp;quot;); //expect to fail&lt;br /&gt;
 		&lt;br /&gt;
 	}&lt;br /&gt;
  &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Also Note==&lt;br /&gt;
We will provide time for you to ask about any problems you have been having so be sure to think of some specific questions you want to ask us.&lt;br /&gt;
&lt;br /&gt;
[[User:grob083|--Glen]]&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>