People usually say that genetic algorithms are used to solve optimization problems, but when it comes to optimizing a specific function given in an analytic form (i.e. when it comes to finding a maximum or minimum of such a function), it may not be clear how to proceed. I have created a complete but simple implementation and explanation of how to solve this problem here, but let me also describe here the main idea behind the approach. Before that, let's briefly review genetic algorithms (GAs).
Genetic algorithms
Genetic algorithms are composed of
a population (i.e. a set) of individuals (also known as chromosomes or genotypes), which represent the solutions to some problem
a fitness function that evaluates each individual (i.e. how "good" it is, maybe compared to other individuals, where "good" depends on the problem)
genetic operations to stochastically change the individuals in the population: typically, these operations are the mutation and cross-over
a method to select individuals for the cross-over (where you combine 2 or more individuals to produce other individuals); the selection is also a genetic operation
How to solve your problem?
To solve any problem with genetic algorithms, you first need to address all the four points above, i.e. define what your individuals (i.e. solutions) are, how to compute the fitness of a solution (i.e. how good it is), and define the specific evolutionary operations (specifically, mutation, cross-over and selection).
In your specific problem, the solutions are $\hat{x} \in \mathbb{R}$, such that
$$f(x)=\frac{-x^{2}}{10}+3 x$$
is a (local or global) maximum, i.e. $f(\hat{x}) \geq f(x)$, for all $x \in \mathbb{R}$ in a neighbourhood of $\hat{x}$.
(Note that this is just the definition of the problem of function maximization: if you are not familiar with it, you should probably get familiar with it before trying to understand this answer or even trying to solve this problem with GAs).
Therefore, in this case, the individuals are real numbers (which are the inputs to $f$).
The fitness function can be a function that computes $f(x_i)$, for all $x_i$ in your population, then compares $f(x_i)$ to $f(x_j)$ for all $i \neq j$. The higher the $f(x_i)$, the closer it is to a maximum.
The genetic operations can be implemented in different ways. You should think about it. If you are familiar with GAs and you know now that solutions are real numbers, at least one way of implementing these genetic operations should come to your mind at this point. Keep in mind that your solutions should be in the range $[0, 32]$, i.e. this is a constrained optimization problem. If you do not have any idea on how to implement them, take a look at my implementation/explanation.