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
Zinaida [17]
4 years ago
8

This assignment involves writing a program that models a dog. A dog has a name, a breed (which may be unknown), a gender (male o

r female), an age (in months), and a weight (in pounds). And…a dog may or may not have fleas. Dog behaviors include eating ( "chomp chomp chomp" ), barking ( "woof woof woof" ), and scratching fleas if a dog has any ( you can determine what this sound should be). Design a Dog class that models the attributes and behaviors described above. Provide appropriate class constructors, getter methods, setter methods, and any other methods you think are necessary to model a dog. When a dog object is created, in won’t have fleas unless you specify otherwise, so you’ll need to use multiple constructors. Write a main method that creates at least two dogs and invokes their behaviors and displays their attributes.
Computers and Technology
1 answer:
Vinil7 [7]4 years ago
3 0

Answer:

This is very complex for our users please shorten this question. Thank You

Explanation:

You might be interested in
What's your thoughts on people using Brainly to cheat academically?
lys-0071 [83]

Answer:

At this point, school isnt even about learning anymore. Its just about passing so you dont end up being a dropout or just a bum in general cause not everyone has the skills to make something out of nothing.

Explanation:

7 0
3 years ago
Read 2 more answers
Write a program that asks the user for three strings. Then, print out whether the first string concatenated to the second string
ipn [44]

Answer:

import java.util.Scanner;

public class num5 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter The First String");

       String str1 = in.next();

       System.out.println("Enter The Second String");

       String str2 = in.next();

       System.out.println("Enter The Third String");

       String str3 = in.next();

       String oneAndTwo = str1+str2;

       if(str3.equals(oneAndTwo)){

           System.out.println(str1+" + "+str2+" is equal to "+str3+"!");

       }

       else

           System.out.println(str1+" + "+str2+" is not equal to "+str3+"!");

   }

}

Explanation:

  • Implemented in Using Java Programming Language
  • Import Scanner Class to prompt and receive users' input
  • Create three string variables and store the three values entered by the user (str1, str2 and str3)
  • Concatenate str1 and str2 using the + operator and assign to a new variable
  • Use the if statement with Java's .equals() method to check for equality of the new string with the third string
  • Print the appropriate message if the equal or not
8 0
3 years ago
_____ consists of computer equipment used to perform input, processing, and output activities.
goldfiish [28.3K]
<span> (keyboards, mice, scanning, computer chips)</span>
6 0
3 years ago
Class Main {
Ganezh [65]

Answer:

class Main {

 static void printPowers(int howMany, int nrRows) {

   for(int n=1; n<=nrRows; n++) {

     for(int power = 1; power<=howMany; power++) {

       System.out.printf("%d ", (int) Math.pow(n, power));

     }

     System.out.println();

   }

 }

 public static void main(String[] args) {

   printPowers(3, 5);

 }

}

class Main {

 static void printPowers(int howMany, int nrRows) {

   int n = 1;

   do {

     int power = 1;

     do {

       System.out.printf("%d ", (int) Math.pow(n, power));

       power++;

     } while (power <= howMany);

     System.out.println();

     n++;

   } while (n <= nrRows);

 }

 public static void main(String[] args) {

   printPowers(3, 5);

 }

}

Explanation:

The for loop gives the cleanest, shortest code.

4 0
2 years ago
What is the capacity of a disk with two platters, 10,000 cylinders, an average of 400 sectors per track, and 512 bytes per secto
natita [175]

Answer:

The capacity of the disk is "40 GB".

Explanation:

Given value:

\to \text{cylinder}= 10,000\\\\\to \frac{sector}{track} = 400\\\\\to \frac{bytes}{sector} = 512\\

\text{Calculating the size of track} =  \frac{bytes}{sector} \times  \frac{sector}{track}

                                            = 512 \times  400 \\\\ = 204,800 \ \ Or  \ \ 200 \ K

\text{Calculating the size of surface} = \frac{byte}{track} \times \ cylinder

                                               = 2000 \ K \times  10,000 \\\\ = 20, 000,000 \ K

\text{Calculating the capacity of a disk} = \frac{byte}{surface} \times \frac{surface}{disk}

                                                     = 20, 000,000 \ K \times  2 \\\\ = 40, 000,000 \ K \\\\= 40 \ GB

Cache memory is often used to speed up the runtime. It will enable us to improve performance unless we can store information, that is retrieved constantly in memory space.

  • Hit Cache: when the Processor relates to representing database data, Cache Hit results.
  • Miss Cache: when this Processor responds to a non-present cache data, this will trigger its miss of cache.
  • It doesn't have to retrieve the Main Memory through secondary storage.
3 0
3 years ago
Other questions:
  • Technician A says a 2:1 gear ratio doubles the amount of torque. Technician B says a 2:1 gear ratio reduces the speed by half. W
    8·1 answer
  • How can you tell that a rolling soccer ball is in motion
    5·1 answer
  • What is Napoleon's friend's name? From the Napoleon Dynamite movie.
    14·1 answer
  • What is the maximum duration of daily scrum meetings A:15minsB:45minsC10mins:30mins
    7·2 answers
  • ENG103 DISCUSSION BOARD 5
    12·1 answer
  • Which two options are negotiated via ncp during the establishment of a ppp connection that will use the ipv4 network layer proto
    7·1 answer
  • before Katie turns in the paper she typed she wants a peer to review it and give her feedback Katie uses her all in one printer
    10·1 answer
  • What are the programming concepts (within or outside the scope of IT210) that you would like to strengthen and delve into furthe
    11·1 answer
  • ......... defines the path of the movement for an object.
    12·1 answer
  • A central issue of public sharing is:
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!