Ask Question
5 August, 21:16

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".

+5
Answers (1)
  1. 6 August, 00:18
    0
    it would be

    myAlarm. changeCode ("3456", "7921");
Know the Answer?
Not Sure About the Answer?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers