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

Create a public class Dog that stores a single double age set by the constructor. (Reject negative ages using assert.) Dog shoul

d also provide a single class method named isOlder. isOrder should accept two Dog instances and return true if the first is older than the second, and false otherwise. You should also assert that both passed instances are not null.
Computers and Technology
1 answer:
hjlf3 years ago
7 0

Answer:

Explanation:

The following is written in Java and has the methods as requested in the question...

class Dog {

   private double age;

   public Dog(double v) {

       assert v >= 0:" Not valid";

       this.age = v;

   }

   public boolean isOlder(Dog dog1, Dog dog2) {

       if (dog1.age > dog2.age) {

           return true;

       } else {

           return false;

       }

   }

}

You might be interested in
Recall that with the CSMA/CD protocol, the adapter waits K. 512 bit times after a collision, where K is drawn randomly. a. For f
julia-pushkina [17]

Complete Question:

Recall that with the CSMA/CD protocol, the adapter waits K. 512 bit times after a collision, where K is drawn randomly. a. For first collision, if K=100, how long does the adapter wait until sensing the channel again for a 1 Mbps broadcast channel? For a 10 Mbps broadcast channel?

Answer:

a) 51.2 msec.  b) 5.12 msec

Explanation:

If K=100, the time that the adapter must wait until sensing a channel after detecting a first collision, is given by the following expression:

  • Tw = K*512* bit time

The bit time, is just the inverse of the channel bandwidh, expressed in bits per second, so for the two instances posed by the question, we have:

a) BW  = 1 Mbps = 10⁶ bps

⇒ Tw = 100*512*(1/10⁶) bps = 51.2*10⁻³ sec. = 51.2 msec

b) BW = 10 Mbps = 10⁷ bps

⇒ Tw = 100*512*(1/10⁷) bps = 5.12*10⁻³ sec. = 5.12 msec

5 0
3 years ago
What would you need to have on your foley stage
LUCKY_DIMON [66]
<span>You will need many props for your Specific tracks (whatever you see in the film!). It's impossible to say what you will need until you see the picture and as time goes by you will add to your collection (if you have space!) - garbage day in my neighborhood is 'golden day' as I collect some of best props from the stuff people throw out: old bicycles, doors, sinks, wood, metal, desks, etc.</span>
4 0
3 years ago
Q-3 A technician is setting up a computer lab. Computers on the same subnet need to communicate with each
Tasya [4]

Answer:

the answer would be B proxy server

4 0
3 years ago
Write an algorithm for switching off the electric water heater automatically when the temperature rises to 70 o Celsius.
noname [10]

Answer:

The algorithm for switching off the electric water heater automatically when the temperature rises to 70 o Celsius is given below.

Explanation:

Let use python code for this question.

we will use if statement to check the condition if the temperature is greater than 70.

When the temperature is 70, then the algorithm will send signal to hardware to turn yourself off.

if(temperature==70):

      print("send_turn_off_signal")

3 0
2 years ago
What does an industry expect of you as an employee?<br><br> At least 3 please!
Hatshy [7]
Trusting, loyal, and a hard worker. All indristies want employees who won't backstab, works hard, and is loyal to the company
7 0
3 years ago
Read 2 more answers
Other questions:
  • DO MOBILE DEVICES HAVE TO WORK IN LIMITED SCREEN SPACE
    11·2 answers
  • A popular encryption method used to protect data that travel over a wireless network is ____
    12·1 answer
  • Write a program that allows the user to enter the last names of five candidates in a local election and the votes received by ea
    12·1 answer
  • What is a disadvantage of shopping online?A.Harder to compare prices than in storesB.A higher risk of financial data theftC.More
    6·2 answers
  • What is the output of the following program?
    11·1 answer
  • 1.which screen appears after the password is typed (welcome, lock)​
    11·2 answers
  • What is the distance from the end of the pin to the center of the hole?
    15·1 answer
  • Are tigers and goldfish related
    13·1 answer
  • How to use boolean to check if math answer is correct java
    7·2 answers
  • what is one benefit of placing voip gateways in geographically separated branch offices that have an existing wan connection?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!