int choice = 0;
while (choice !=4)
{
System.out.println("Welcome to Car Company");
System.out.println("Main Menu");
System.out.println("");
System.out.println("1. Add a new car.");...
Type: Posts; User: javapenguin
int choice = 0;
while (choice !=4)
{
System.out.println("Welcome to Car Company");
System.out.println("Main Menu");
System.out.println("");
System.out.println("1. Add a new car.");...
That's simple.
For instance, to create one Bus object and one Car object in the main method, you
public static void main(String[] args)
{
Car car = new Car(12345, "Luke Skywalker",...
As for how to use them in the "main", you can simply use the objects in your arrays.
However, it would be better if your constructor for Vehicle called the three set methods of that class and used...
Not quite sure on this one, but try
public Car(int licensePlateNumber,String maker,String modelName, boolean availability)
{
super(licensePlateNumber, maker, modelName); // calls constructor...
New Car("123AAA","Toyota","Corolla"),
New Car("1432BBB","Honda","Stream","") , new Car("121BCA","Toyota","Avalon")
It appears there's a comma after Stream.
Also, new isn't capitalized.
...