This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ListRunner{ | |
public static void main(String args[]){ | |
MyList ml = new MyList(); | |
//for( i = 0; i< 20; i++) | |
ml.add(1); | |
ml.add(2); | |
ml.add(3); | |
ml.add(4); | |
ml.add(5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LeeRacer implements Racer{ | |
private int maxSpeed; | |
private int maxHandling; | |
private String[] track; | |
private int position; | |
public LeeRacer(){ | |
maxSpeed = 50; | |
maxHandling = 50; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Interface Learnable{ | |
int study(); | |
int practice(); | |
boolean test(); | |
void learned(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Mom implements Replenishable{ | |
private int bankAccount; | |
public int getCurrentAmount(bankAccount){ | |
// finds out the current anoint in the bank account | |
} | |
public int getFullAmount(bankAccount){ | |
// finds out how much there should be | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AwkwardCritter extends Critter { | |
public AwkwardCritter(String s, int h, int a, int l,String n){ | |
super(s,h,a,l,n); | |
} | |
public void passDay(int days){ | |
status = name + " 's age is " + days; | |
if(healthChecker()){ | |
System.out.println(name + " = DEAD"); | |
}else{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Cat extends Pet{ | |
public Cat(String n,int hl, int tl, int cl,int al, String ec) { | |
super(n,hl,tl,cl,al,ec); | |
} | |
public void awesome(){ | |
System.out.println("being more awesome than dog..."); | |
} | |
public void makeSound(){ | |
System.out.println("Cat is purring..."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Boy extends Man{ | |
public Boy(String n, int a, int s){ | |
super(n,a,s); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
public class Browser { | |
private boolean browsing; | |
private WebVisit currentVisit; | |
/** | |
* Main method for the application. Create a new Browser object and set it to run. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Cat extends Pet{ | |
public Cat(String n,int hl, int tl, int cl,int al, String ec) { | |
super(n,hl,tl,cl,al,ec); | |
} | |
public void awesome(){ | |
System.out.println("being more awesome than dog..."); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Circle { | |
protected int radius; | |
public Circle(int r) { | |
radius = r; | |
} | |
public void setRadius(int r) { | |
r = radius; |
NewerOlder