Let g(x)=kx2 be defined on the interval [0,3]. It is known that the average value of g over this interval equals 6.
a. (i) Write the mathematical expression representing the average value of g on [0,3].
b. (ii) Compute the value of the constant k that satisfies the given condition.