Deciding how general purpose a program to write is a key step in the program design process. You might be asked to write a program to do a specific task, but decide to spend a little more time writing a program that can do that task and others.
For example, if you live in an area with a 20% tax rate, you might decide to write a payroll program that deducted 20% from gross pay for tax. Alternatively, you might design a more general program that allowed the user to specify the tax rate. The more general payroll program could be used in any area, regardless of the tax rate.