Please Help Fast!
Hello I have a Program due tommorow and I cannot figure out whats going wrong!
import java.util.*;
publicclass NasaCenter
{
private String nasaName;
private Location nasaLocation;
privatestatic Vector roverList =new Vector();
public NasaCenter(Location givenLocation)
{
nasaLocation = givenLocation;
}
protectedvoid addRover(Rover myRover)
{
this.roverList.addElement(myRover);
}
protected Rover getClosestRover(Location myLocation)
{
int roverPicked = 0;
int i = 0;
double dtemp = 0;
Rover myRover = (Rover) this.roverList.elementAt(0);
double myDistance = myRover.getCurrentLocation().distanceFrom(myLocation);
for (Enumeration e = this.roverList.elements(); e.hasMoreElements();)
{
myRover = (Rover) this.roverList.elementAt(i);
dtemp = myRover.getCurrentLocation().distanceFrom(myLocation);
if (dtemp < myDistance){myDistance = dtemp; roverPicked = i;}
}
return (Rover) this.roverList.elementAt(i);
}
publicvoid moveRoverTo(Location myLocation)
{
Rover roverToMove = getClosestRover(myLocation);
roverToMove.setDestination(myLocation);
}
publicvoid processData(RoverReading myRoverReading)
{
String tempReading =null;
tempReading = myRoverReading.toString();
System.out.println(tempReading +" NasaControl: " + this.nasaName);
}
public Rover getRover(int i)
{
return (Rover) this.roverList.elementAt(i);
}
}
Ok so the is soppose to be my parent Class witch complies perfectly fine... then my child class.
class NasaControlextends NasaCenter
{
publicvoid moveRoverTo(Location myLocation)
{
Rover roverToMove = getClosestRover(myLocation);
roverToMove.setDestination(myLocation);
}
publicvoid addRover(String myString)
{
this.addRover(new Rover(myString));
}
}
and when I try to complie this one I get
NasaControl.java:1: cannot resolve symbol
symbol : constructor NasaCenter ()
location: class NasaCenter
class NasaControl extends NasaCenter
^
1 error
I cannot figure out what it wants from me. Iv tried everything I can think of, but i bet it's some simple answer lol. If anyone knows please help.

