Counterexamples in Double Integral

I need to:

$a.$ Give an example of function $f:\mathbb{R\times R}$ $\to$
$\mathbb{R}$ with domain in $[0,1]^2$ so that double integral exists but the function is not Riemann integrable.

$b.$ Give an example (if any) for a non-integrable function $f:\mathbb{R\times R}$ $\to$
$\mathbb{R}$ with domain in $[0,1]^2$ such that both iterated integrals exists(i.e. in both order of integration.)

Here is what I think about $(a)$:

$$
f(x,y) =
\begin{cases}
1, & \text{if }x=1/3, \text {and } y\in \mathbb{Q} \\
0, & \text{otherwise }
\end{cases}
$$

According to me, this function should work. As irrationals are dense in $[0,1]$, points of discontinuities are not finite, thus Jordan measure is not zero. This implies function is not Riemann integrable.
As the infimums are zero for all partions of the $[0,1]^2$, lower riemann integral is zero. But refinement of partitions can also make the volume of the each little “cube” approach zero. Hence double integral exists.

Please correct this if need be.

About $(b)$, intuitively, I don’t think such function exists. But I cannot give a rigorous proof for this. Again, I look forward for your help. Thanks.

Solutions Collecting From Web of "Counterexamples in Double Integral"