Discussion Board, Programming Logic

For this Discussion Board, please complete the following:

A computer program may need to accomplish multiple tasks. For example, an automated teller machine (ATM) program can accomplish the following tasks:

  • Verifying user’s credential
  • Displaying the current balance
  • Depositing money
  • Withdrawing money

A function is a block of organized and reusable code that can be used to accomplish a specific task. Assume that you are the programmer hired by a bank to write a program for its automated teller machines (ATM). Give an example of a task that you want to use a function to accomplish in the program, and answer the following questions:

  • What are the benefits to using a function to accomplish that task?
  • Does the function need parameters or return value? Why or why not?