Ask Question

Suppose there is a class Alarm. Alarm has two class variables, code which contains a String value representing the code that deactivates the alarm, and armed which contains a boolean describing whether or not the alarm is activated. Alarm has a function changeCode that takes two parameters containing Strings, the first representing the current code, and the second representing the new code. If the user inputs the current code correctly, the value of code is changed to that of the new code. Call the changeCode function on the Alarm object myAlarm, whose current code is "3456", and change the code to "7921".

+4
Answers (1)
  1. 31 December, 20:59
    0
    it would be

    myAlarm. changeCode ("3456", "7921");
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Suppose there is a class Alarm. Alarm has two class variables, code which contains a String value representing the code that deactivates ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers