package com.j3ltd.java15changes;

enum Vehicle {
	unicycle(1), bicycle(2), 
	motorbike(2), car(4), van(4), 
	truck(6), lorry(8);
	
	int numberOfWheels;
	
	Vehicle(int wheels) {
		numberOfWheels = wheels;
	}
	
	public int getWheelNumberOfWheels() {
		return numberOfWheels;
	}
}
public class EnumerationTypes {

	public static void main(String[] args) {
		Vehicle aVehicle;
		
		aVehicle = Vehicle.van;
		switch (aVehicle) {
		  case unicycle:
			  System.out.println("A unicycle is not easy to ride\n");
			  break;
		  case lorry:
			  System.out.println("A lorry is not easy to drive\n");
			  break;
		  case bicycle:
		  case motorbike:
			  System.out.println("A " + aVehicle + " is relatively easy to ride\n");
			  break;
		  default:
			  System.out.println("A " + aVehicle + " is easy to drive");
		}
		
		System.out.println("A " + aVehicle + " has " + 
				            aVehicle.getWheelNumberOfWheels() + 
				            " wheels\n");
		if (aVehicle == Vehicle.van) {
	       System.out.println("Do you drive a your van in the UK?\n");
		}
	}

}
