Solved

Which of the Following Methods Returns a Value

Question 37

Multiple Choice

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

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents