Implement a superclass Vehicle and subclass Car and Truck. A vehicle has a position on thescreen. Write a method draw that draw cars and trucks as follows:CarTruckThen write a method randomVehicle that randomly generates Vehicle references, with anequal probability for constructing cars and trucks, with random positions. Call it 10 timesand draw all of them.Hint: You will need the following lilibraries:
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;