Monday, October 19, 2009

Pg. 287 Exercise 4

public class Computer{
private String hardDrive;

public void SwapHardDrive(Computer otherComputer){
String temp;
temp = otherComputer.hardDrive;
otherComputer.hardDrive = this.hardDrive;
this.hardDrive = temp;
}//end of SwapHardDrive method
}//end of Computer class

No comments:

Post a Comment