Search:

Type: Posts; User: javapenguin

Search: Search took 0.10 seconds.

  1. Replies
    9
    Views
    3,293

    Re: how I can solve this program ?

    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.");...
  2. Replies
    9
    Views
    3,293

    Re: how I can solve this program ?

    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",...
  3. Replies
    9
    Views
    3,293

    Re: how I can solve this program ?

    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...
  4. Replies
    9
    Views
    3,293

    Re: how I can solve this program ?

    Not quite sure on this one, but try


    public Car(int licensePlateNumber,String maker,String modelName, boolean availability)
    {
    super(licensePlateNumber, maker, modelName); // calls constructor...
  5. Replies
    9
    Views
    3,293

    Re: how I can solve this program ?

    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.
    ...
Results 1 to 5 of 5