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
Releasing refrigerant R-12 into the atmosphere is a criminal offense
nevsk [136]
I'm guessing you want a yes or no... I think yes.
8 0
3 years ago
Read 2 more answers
04. Suppose a computer program needs to sort a list of student records in ascending order
34kurt

Answer:

D) ["Kathy Bones", "Jill Brewer", "Joe Schnook", "Tom Smith"]

Explanation:

The context of the problem explains a computer program that sorts names in "ascending order" (A to Z) since the ASCII table has capital A start a lower number and it increases from there to capital Z.

Notice how the attached file, which is a portion of the ASCII table, shows that letters after A are also higher in decimal value than the previous letter.

With this in mind, we know that all this program does is sort by last name alphabetical order. From there, just sort the given names using that same criteria, last name alphabetical order, and the correct answer is determined.

<em>Please put "Brainliest" on my answer if it helped you out!</em>

<em>If you want to learn more about this subject, you can search:</em>

<em>- ASCII Table</em>

<em>- Lists in Programming</em>

<em>- Sorting Procedures</em>

7 0
2 years ago
Which of the following likely comes last in developing a presentation outline
kari74 [83]
So in developing a presentation outline, the first thing that we are going to do is to introduce what it is all about. This means that the main points come first. After the main points, follow the sub points. The sub points serve as the explanation of the main points. After the sub points are the illustrations and examples. These are already the specifics which support the sub points and the main points. Therefore, the answer is A.
8 0
3 years ago
Read 2 more answers
What a suitable variable name to store the number of years old a person is
navik [9.2K]

age is a suitable variable name. It's descriptive and concise. Make sure it's lowercase.

8 0
3 years ago
Which of these is the longest geologic time frame?
snow_lady [41]
The largest geologic time frame is Eon.
4 0
3 years ago
Read 2 more answers
Other questions:
  • The length of a hailstone sequence is the number of terms it contains. For example, the hailstone sequence in example 1 (5, 16,
    9·1 answer
  • Which process refers to starting up a computer?
    9·2 answers
  • Which tasks can Kim complete using the Customize Ribbon dialog box? Check all that apply.
    14·1 answer
  • One of the disadvantages of an e-marketplace is that it cannot provide a single platform for prices. true or false?
    10·2 answers
  • Although heart rate increases and decrease depending upon activity level on average a typical person heart rate is about _____ b
    10·1 answer
  • Find a 95% confidence interval for the mean failure pressure for this type of roof panel.The article "Wind-Uplift Capacity of Re
    7·1 answer
  • Please help on both of these questions will give brainliest<br> !!
    9·2 answers
  • the ghost adventures team uses a variety of tools and technology in investigations. which one is described as an adjustable freq
    9·1 answer
  • Anyone knows the answer for 6.1.4 Happy Birthday! codehs
    13·1 answer
  • Assume you have written a method with the header num yourMethod(string name, num code). The method's type is ____ .
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!