1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
n200080 [17]
2 years ago
10

A combination lock has the following basic properties:

Computers and Technology
1 answer:
fomenos2 years ago
5 0

Answer:

public class CombinationLock {

   

    private int combinationNumber1 = 0;

    private int combinationNumber2 = 0;

    private int combinationNumber3 = 0;

   

   CombinationLock(int combinationNumber1, int combinationNumber2, int combinationNumber3){

       this.combinationNumber1 = combinationNumber1;

       this.combinationNumber2 = combinationNumber2;

       this.combinationNumber3 = combinationNumber3;

   }

   

   public boolean open(int number1, int number2, int number3){

       if(number1 == combinationNumber1 && number2 == combinationNumber2 && number3 == combinationNumber3)

           return true;

       else

           return false;

   }

   

   public boolean changeCombo(int number1, int number2, int number3, int newNumber1, int newNumber2, int newNumber3){

       

       if (open(number1, number2, number3)){

           combinationNumber1 = newNumber1;

           combinationNumber2 = newNumber2;

           combinationNumber3 = newNumber3;

           return true;

       }else

           return false;

   }

}

Explanation:

- <em>Three variables</em> are created to hold the combination.

- A <em>constructor</em> is created to set the combination.

- A boolean method called <em>open</em> is created to check if the given numbers are correct, and <u>returns true</u> (<u>otherwise returns false</u>).

- A boolean method method called <em>changeCombo</em> is created to check if given numbers are correct. If they are correct, it assigns new values for the combination and <u>returns true</u> (<u>otherwise returns false</u>).

You might be interested in
The factors of power of device
LUCKY_DIMON [66]

Answer:

tfopod

Explanation:

5 0
2 years ago
____ a device receiving a process variable
Tanya [424]

Answer:

Transmitter

Maybe this is the answer or the question is wrong.

Explanation:

In the world of process control, a Transmitter is a device that converts the signal produced by a sensor into a standard instrumentation signal representing a process variable being measured and controlled.

6 0
3 years ago
Pda bkhhksejc pnwjoynelp dwo xaaj ajykzaz ywj ukq zaykza ep???<br><br><br> The Key Value is 22
Sindrei [870]

Answer:

The following transcript has been encoded can you decode it???

Explanation:

It is a ceasar cipher. Shift every letter in the alphabet by 22 positions.

3 0
3 years ago
"the ____ criteria filter requires the records displayed to have the specified text string anywhere."
Debora [2.8K]

The contains criteria filter requires the records displayed to have the specified text string anywhere. Thecontains operator is used to perform case-sensitive matching regardless of location in strings.

The begins with criteria filter on the other hand requires the records displayed to start with the specified text string

3 0
2 years ago
Basic computer programs used by a variety of companies include:
elena55 [62]

Answer:

spreadsheets

Explanation:

every company uses spreadsheets because they are used to list and organize data easily

7 0
2 years ago
Other questions:
  • You are logged in as a user with limited system privileges, you are the linux system administrator and you have the password to
    5·1 answer
  • These tools give presenters more freedom to move about the room and interact with their audience.
    5·2 answers
  • Which registry hive is loaded first during windows startup?
    5·1 answer
  • Using computer software, compare the 2016 year-to-date sales through February to the 2017 year-to-date sales through February fo
    15·1 answer
  • Assume that a is an array of two or more integers, and that b and c are integers.
    13·1 answer
  • In apersuasive message, opposing ideas should be:
    13·1 answer
  • Which of the following JavaScript expressions is equivalent to the given HTML code? ​ a. Document.getelementbyId("menu1").menu=
    6·1 answer
  • Can some one help me i do not now how to give a BRANLEST. if you help i will give you one BRANLEST.
    7·2 answers
  • What is the difference between private inheritance and composition?
    11·1 answer
  • Can someone help me so I don’t fail this class:(
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!