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
File
Degger [83]

Explanation:

formula should add cells D3:07.

Empanadas & More

1

In cell D9 create a formula that calculates the total after a 10% disco

you need help understanding how to take a percentage off of a total

LINE TOTAL

2 MENU ITEM

3 Empanadas: Buffalo Chicken

4 Empanadas: Braised Short Rib

5 Empanadas: Fig and Goat Cheese

6 Sides: Black beans and rice

7

UNIT PRICE

$2.98

$2.98

$3.75

$1.98

QUANTITY

20

30

25

40

TAX

8

TOTAL

6 0
3 years ago
What is the wave speed of a wave that has a frequency of 100 Hz and a wavelength of 0.30m?
swat32

<u><em>Answer:</em></u>

<u><em>The speed is  </em></u>

<u><em>= </em></u>

<u><em>30 </em></u>

<u><em>m </em></u>

<u><em>s </em></u>

<u><em>− </em></u>

<u><em>1 </em></u>

<u><em> </em></u>

<u><em>Explanation: </em></u>

<u><em>The speed of a wave is given by </em></u>

<u><em> </em></u>

<u><em>speed </em></u>

<u><em>( </em></u>

<u><em>m </em></u>

<u><em>s </em></u>

<u><em>− </em></u>

<u><em>1 </em></u>

<u><em>) </em></u>

<u><em>= </em></u>

<u><em>frequency(Hz) </em></u>

<u><em>× </em></u>

<u><em>wavelength (m) </em></u>

<u><em> </em></u>

<u><em>The frequency is  </em></u>

<u><em>f </em></u>

<u><em>= </em></u>

<u><em>100 </em></u>

<u><em>H </em></u>

<u><em>z </em></u>

<u><em> </em></u>

<u><em>The wavelength is  </em></u>

<u><em>λ </em></u>

<u><em>= </em></u>

<u><em>0.3 </em></u>

<u><em>m </em></u>

<u><em> </em></u>

<u><em>The speed is </em></u>

<u><em> </em></u>

<u><em>v </em></u>

<u><em>= </em></u>

<u><em>λ </em></u>

<u><em>f </em></u>

<u><em>= </em></u>

<u><em>0.3 </em></u>

<u><em>⋅ </em></u>

<u><em>100 </em></u>

<u><em>= </em></u>

<u><em>30 </em></u>

<u><em>m </em></u>

<u><em>s </em></u>

<u><em>− </em></u>

<u><em>1 </em></u>

<u><em> </em></u>

<u><em></em></u>

<u><em></em></u>

<u><em></em></u>

6 0
3 years ago
Explain Importance of flowchart in computer programming
zhuklara [117]

Answer:

Flow charts help programmers develop the most efficient coding because they can clearly see where the data is going to end up. Flow charts help programmers figure out where a potential problem area is and helps them with debugging or cleaning up code that is not working.

creds to study.com (please don't copy it work by word, make sure to paraphrase it. otherwise plagiarism is in the game.)

Explanation:

7 0
2 years ago
What sequence is used to create a brochure document from a template?
GenaCL600 [577]

Answer:

computer is used to create a voucher document

6 0
2 years ago
Read 2 more answers
Networks provide businesses with these benefits.
tekilochka [14]

Answer:

1. Easier collaboration.

2. Improved communications.

3. Increased productivity.

4. Reduced cost.

Explanation:

Computer network is a group of computers connected together using a common communication protocol for the purpose of transmitting data electronically and sharing resources such as internet, printers, scanner etc. The computer network is mainly divided into three, these include;

- Wide Area Network (WAN).

- Metropolitan Area Network (MAN).

- Local Area Network (LAN).

Also, a network is made up of nodes, which comprises of systems or devices that are connected to a network and are capable of sending, receiving or transferring data e.g switch, hub, computer, server, printer etc.

The benefits of the computer network are, it improves communication, convenient resources sharing, reduced operating costs, increase productivity, flexibility and efficiency for users.

6 0
3 years ago
Other questions:
  • A _____________ is a method of controlled entry into a facility and provides access to secure areas such as a research lab or da
    10·1 answer
  • What was the impact of the rise of the Japanese auto industry and the semiconductor industry in south eastern​ Asia? A. It incre
    13·1 answer
  • What is the name of the interface that uses graphics as compared to a command-driven interface?
    11·1 answer
  • Jump to Question: Fill in the blanks below: The flow of electricty is similar to the movement of water through a pipe. The movem
    15·1 answer
  • Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print o
    6·1 answer
  • Banks use _____, which are electronic transmissions of account exchange information over private communications’ networks.
    14·1 answer
  • What type of maintenance is required of a computer’s power supply to ensure that it remains in working order?
    15·2 answers
  • Use the {blank} to view your presentation the way an audience will see it.
    13·2 answers
  • HELP ME ILL GIVE BRAINLY Input 50 numbers and then output the average of the negative numbers only. Write in pseudocode!
    11·1 answer
  • What the difference between an operating system drive and a storage drive?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!