Class Starship {
int warpSpeed;
int distanceTraveled;
CrewMember [] crew;
CrewMember captain;
public boolean travelTo(int xCoord, int yCoord, int zCoord);
public void teleport(CrewMember crewMember);
}
Starship enterprise = new Starship();
CrewMember spock = new CrewMember();
enterprise.teleport(spock);
//Furniture constructor
public Furniture(int height, int width, int depth) {
//set properties
}
//Table constructor use
Furniture t = new Furniture(3, 5, 3);
System.out.println(t.volume());
Class Starship {
private int numberOfCrewMembers;
private int crewLimit = 15;
public void setNumberOfCrewMembers(int crew) {
if(crew <= crewLimit)
numberOfCrewMembers = crew;
}
}
public static int aNumber = 3;
public static String convertString(String word);
public final int anotherNumber = 2;
public final void finalMethod(int number);
public final class SomeClass{ }