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]
3 years ago
10

A combination lock has the following basic properties:

Computers and Technology
1 answer:
fomenos3 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
When the atmosphere has too much carbon dioxide in it, the oceans absorb some of it to achieve a new balance. This is an example
horsena [70]
The answer is B. 
A geochemical cycle. 
8 0
4 years ago
Read 2 more answers
You can change the ____ or position of text within a document's margins.
ahrayia [7]

Answer:

Alignment

Explanation:

That should be correct

7 0
3 years ago
Which is the following should be selected in the paragraph dialogue box to prevent page break from occurring within a paragraph
Savatey [412]

Answer:

Explanation: keep lines together

6 0
3 years ago
Using ________, GoPro encourages its millions of customers to submit their best content to the GoPro website to earn rewards and
coldgirl [10]

Answer:

UGC- User Generated Content

Explanation:

<em>It is a combination of making and user generated content a virtual shoe-tie for Go Pro. Go Pro has established a content marketing plataform able to grew into an extreme ecommerce success history.  Instead of renting media company's audience, they use the brand-building services of millions of costumers.</em>

<em>The marketing team provide the tools and plataform to enable their costumers to share the videos and images they capture.</em>

5 0
3 years ago
Consider the following environment with a local dns caching resolver and a set of authoritative dns name servers
Schach [20]

Answer:

Normally in a DNS server, There are no packet losses•All processing delays are 0 ms

Explanation:

If any packet lost in DNS then lost in the connection information will be displayed in prompt. Once the packet is lost then data is lost. So if the packet is lost then data communications are lost or the receiver will receive data packet in a lost manner, it is useless.

To connect in windows normally it will take 90 ms for re-establish connection it normally delays the time in windows. So that end-user he or she for best performance ping the host or gateway in dos mode so that connection or communication will not be lost. If any packet is dropped DNS will get sent the packet from sender to receiver and the ping rate will more in the network traffics.

7 0
4 years ago
Other questions:
  • Read the PIC Data sheet Chapter 2.0 and 3.0 2. List at least 3 big differences between the Flash and RAM 3. How many RAM locatio
    5·1 answer
  • Establishing responsibilities, planning to best support the organization, acquiring validity, ensuring performance, conformity w
    12·1 answer
  • A machine that is used to print newspaper is a
    12·2 answers
  • Which is a good plan for backing up data?
    6·1 answer
  • A demarc is the point in a telephone network where the maintenance responsibility passes from a telephone company to the subscri
    10·1 answer
  • .... is a way to engage people at different locations in synchronous interaction ( fill in the blank space)​
    14·1 answer
  • Which methods will remove filters? Check all that apply.
    6·2 answers
  • Who knows songs that are sad,happy,excited, and calm
    10·1 answer
  • Which computer are used by mobile employees such as meter readers.​
    6·2 answers
  • How much money did Uta initially invest?$180.00$320.00$352.48$471.70
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!