Name badges


Story

In this exercise you'll be writing code to print name badges for factory employees. Employees have an ID, name and department name. Employee badge labels are formatted as follows: "[id] - [name] - [DEPARTMENT]".

Due to a quirk in the computer system, new employees occasionally don't yet have an ID when they start working at the factory. As badges are required, they will receive a temporary badge without the ID prefix.

Even the factory's owner has to wear a badge at all times. However, an owner does not have a department. In this case, the label should print "OWNER" instead of the department name.

Tasks

These are example tasks that fit the employee badges exercise:

  • Print a badge for an employee
  • Print a badge for a new employee
  • Print a badge for the owner

Implementations