- #1
kirkulator
- 33
- 0
okay so i have my program basically done, i just have one problem and it has to do with an enumerate data type i created
public enum PaintColor {RED, BLACK, WHITE, BLUE, GREEN, OTHER};
in my class that is UsedCars
im tracking attributes of these objects [used cars]
now...on my TestUsedCars class, I am trying to create the object
but no matter what i type in for paint color it doesn't work:
UsedCars basicCar = new UsedCars("honda", "9d9d9d9d0", 1999, 120000, x , 99.0);
'x' is the paintcolor
by the way, the other values are data fields:
carmake, vin number, year manufactured, odometer mileage, paintcolor, car condition rating
i tried putting in RED like i should be able to...or so i thought but it won't work.
thanks so much guys, i literally know nothing about using enumerated types. they just instructed me to do so and gave me one line of code on how to define the enum...so I am struggling figuring out how to do other things with it.
amanda
edit: by the way its beginning JAVA programming, sorry i didnt specify.
public enum PaintColor {RED, BLACK, WHITE, BLUE, GREEN, OTHER};
in my class that is UsedCars
im tracking attributes of these objects [used cars]
now...on my TestUsedCars class, I am trying to create the object
but no matter what i type in for paint color it doesn't work:
UsedCars basicCar = new UsedCars("honda", "9d9d9d9d0", 1999, 120000, x , 99.0);
'x' is the paintcolor
by the way, the other values are data fields:
carmake, vin number, year manufactured, odometer mileage, paintcolor, car condition rating
i tried putting in RED like i should be able to...or so i thought but it won't work.
thanks so much guys, i literally know nothing about using enumerated types. they just instructed me to do so and gave me one line of code on how to define the enum...so I am struggling figuring out how to do other things with it.
amanda
edit: by the way its beginning JAVA programming, sorry i didnt specify.