0% found this document useful (0 votes)
40 views4 pages

Poo 2

The document contains 6 sections that define Automobil objects with different attributes like model, make, color, doors, horsepower, price. Each section initializes an Automobil object by passing in the attribute values as constructor parameters.

Uploaded by

Aliona Ureche
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views4 pages

Poo 2

The document contains 6 sections that define Automobil objects with different attributes like model, make, color, doors, horsepower, price. Each section initializes an Automobil object by passing in the attribute values as constructor parameters.

Uploaded by

Aliona Ureche
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1

public class Main


{
public static void main(String[] args)
{
Automobil automobil = new Automobil();
Automobil automobil1 = new Automobil
(
"M5",
"BMW",
"Negru",
5,
100,
280,
"Automat",
"Sedan",
false,
150000
);
}
}

public class Main


{
public static void main(String[] args)
{
Automobil automobil = new Automobil();
Automobil automobil1 = new Automobil
(
"911 ",
"Porshe",
"Rosu",
3,
80,
300,
"Manual",
"Cope",
false,
250000
);
}
}

public class Main


{
public static void main(String[] args)
{
Automobil automobil = new Automobil();
Automobil automobil1 = new Automobil
(
"F40",
"Ferrari",
"Rosu",
3,
90,
320,
"Manual",
"Cope",
false,
300000
);
}
}

public class Main


{
public static void main(String[] args)
{
Automobil automobil = new Automobil();
Automobil automobil1 = new Automobil
(
"P100",
"Tesla",
"Negru",
5,
0,
300,
"Automat",
"Sedan",
true,
100000
);
}
}

public class Main


{
public static void main(String[] args)
{
Automobil automobil = new Automobil();
Automobil automobil1 = new Automobil
(
"NSX",
"Honda",
"Alb",
3,
110,
280,
"Manual",
"Cope",
true,
90000
);
}
}

public class Main


{
public static void main(String[] args)
{
Automobil automobil = new Automobil();
Automobil automobil1 = new Automobil
(
"Civic",
"Honda",
"Sur",
3,
800,
250,
"Manual",
"HatchBack",
false,
50000
);
}
}

You might also like