-
Create a "Car" class that has the following attributes:
brand,model,year,price. Create several car objects with different attributes. -
Add those cars objects to a
carslist. Using a for loop print each one of the cars in the following format:"Tesla - Model S - 2017 - $81.000 -
Create a class
CarManufacturer. Set the valuesnameandcountry_origin. For example,name="Tesla",country_origin="US". -
Modify the cars so now instead of taking a plain string as a name, they take an object of type
CarManufacturer. -
Modify the for-loop previously created to use the
nameattribute of the car manufacturer.
Last active
June 13, 2017 00:27
-
-
Save santiagobasulto/f33f2b9eaceb083bdf51ebd15a950497 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment