Within nature, the success of many organisms, including certain species of insects, mammals, slime molds, and bacteria, is attributed to their performance of division of labor, where individuals specialize on specific roles and cooperate to survive. The evolution of division of labor is challenging to study because of the slow pace of biological evolution and imperfect historical data. In this paper, we use digital evolution to evolve groups of clonal organisms that exhibit division of labor. We then investigate what mechanisms they use to perform division of labor (i.e., location awareness or communication) and discover that it varies according to the type of roles being performed. Lastly, we created an environment where groups of organisms needed to complete a set of tasks, but could do so as either generalists or specialists. We varied the costs of switching tasks and determined that increased costs can result in the evolution of division of labor. Moreover, a group used as a case study exhibited both division of labor and cooperative problem decomposition, where members of the group shared partial solutions to solve the full set of problems. This approach has the potential to inform predictions in biological studies, as well as achieving division of labor when using evolutionary computation to solve more complex engineering problems.