Design the logic for a program