adding an integer and printing ii...
right its annoying me and more mportantly its probably extremely simple
im trying to get a method (load) to work it adds an integer and prints a line out everytime it adds the int. the max the int can be is in the child classes which extends to vehicle class. objct ones max int is 5, object 2 being 52 and object 3 being 20
for this case it should increment by 1, and then print the results would i do something along the lines like:
[code]
package javavehicles
class Vehicle
{
private int passengerCount; //s the nmber are passengers currently on board
private int passengerCap. //the maximun the object can hold
}
vehicle(String NewName, int newCap)
{
passengerCap = newCap;
name = newName;
}
void load()
{
//this form adds an integer display current passenger capacity
passengerCapacity > passengerCount then
insert method
}
}