Which of the following methods returns a value?

A. Method changeName(String lName, String fName)
   lastName = lName
   firstName = fName
   Display "The name has been changed to " +
firstName + " " + lastName
End Method
B. Method displayInfo()
   Display "Account #: " + acctNumber
   Display "Account type: " + acctType
   Display "Owner name: " + lastName + ", " + firstName
   Display "Current balance: " + acctBal
End Method
C. Method withdraw(Numeric amt)
   acctBal = acctBal - amt
   Display "The new balance is: $" + acctBal
End Method
D. Method inquire()
   Return acctBal
End Method

Answer: D

Computer Science & Information Technology

You might also like to view...

SmartArt diagrams can be used to illustrate a list, but NOT a process

Indicate whether the statement is true or false

Computer Science & Information Technology

Identify the letter of the choice that best matches the phrase or definition.

A. References content that is either nontextual or that cannot be interpreted by an XML parser B. Used when you want to insert content into a DTD itself C. The smaller chunks into which a DTD can be broken D. Most standard vocabularies make these available online for inspection E. Draws its content from an external file F. Interpreted by XML parsers as a reference to another entity G. This supplies a name for a data type and provides clues about how an application should handle the data H. References content to be used within an XML document I. Includes its content in the DTD J. Enables you to divide a DTD into two parts: one interpreted by parsers, and one containing declarations that parsers ignore

Computer Science & Information Technology