Originally Posted by
helloworld922
please use [code] tags, or even better, [highlight="Java"] tags
A 1-D vector of booleans is extremely useful for implementing the sieve of eratosthenes (finding prime numbers), though personally I would either use a boolean array or an ArrayList of booleans, even if I decided to use multi-threaded approach to implementing the sieve (I rarely use vectors in Java).
There is also nothing wrong with declaring a Scanner object inside a method (I usually do this).
What I suspect is the problem is that your bike constructor does not actually set anything.
public Bike(String theName, int itsSize, String itsColor, double cost, int qty) {
// need to actually set the object variables in here
this.name = theName;
this.size = itsSize;
this.color = itsColor;
this.price = cost;
this.quantity = qty;
}
Yep. This was the problem. Thanks!