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
Write a program that reads a book (a file in text format), breaks each line into words, strips whitespace and punctuation from t
diamong [38]

Answer:

Following are the code to this question:

file= open('book.txt') #open file

li= {} #define an empty list

for lines in file: # use for loop Split file data into words

   d= lines.lower().strip(' !?').split() #define variable d that Add it to map

   for val in d: #define loop to store data  

       if val not in li: #check value is not in list

           li[val] = 0 #define list and assign value in 0

       li[val] = li[val] + 1 #Sort the book data and add its value  

m = sorted(li.items(),key = lambda x : -x[1]) #sorted value into the m variable  

print(m[:10]) #print value

Output:

please find the attachment.

Explanation:

In the given python code first, we open the file "book.txt", in next line, an empty list is defined, that uses the for loop which can be described as follows:

  • In the for loop is used, that reads the file data, and defines a variable "d", that stores the values into the map.
  • In the next line another loop is used, that check file values, if values are the same type so, it adds values and writes it.  
  • In the last line, m variable is used, that sorts the values and use the slicing to print its value.

4 0
3 years ago
You have been hired to set up a network for XYZ Enterprises. What factors will you consider to determine the type of network nee
Margarita [4]

Answer:

I would say if it is a multiple choice

Explanation:

q3 or q5 would be the best ones to pick from in my eyes.

3 0
4 years ago
Read 2 more answers
How can I get more views on my you tube channel "Braeden Eischen" without paying anything
ehidna [41]
I’m just post video and there
5 0
3 years ago
Julio receives many emails from a healthcare site. He finds them useful, and he wants to save them all in a folder. How can he a
inysia [295]

Answer:

A

Explanation:

I took the test

6 0
3 years ago
Why should a linked list node be separate from the element stored on the list?
Daniel [21]

Explanation:

A linked list node should be separated from the element stored in the list because it is not reasonable to assume that the each object that we may want insert in the collection can be architectured to cooperate with the collection implementation.

Also the details of the implementation are to kept distinct from the user of that collection , including the elements that the user wants to add to his collection.

8 0
3 years ago
Other questions:
  • What is 1/2 minus 1/16?
    7·2 answers
  • In printing systems using ____, a disk accepts output from several users and acts as a temporary storage area for all output unt
    14·1 answer
  • Before a computer can store a real number in memory, it must be encoded in __________.
    14·1 answer
  • Clarisse is setting the white spaces at the edge of her Word document to be 1 inch. She is setting the _____.
    7·1 answer
  • Java Question-5 Declare and initialize two variables called first and second. Write a single statement that will print the messa
    15·1 answer
  • 14. You can store data copied from any Office application file with the
    14·1 answer
  • Which of these is unused normal, unvisited link ??
    12·1 answer
  • Write a program that creates a two-dimensional array initialized with test data. Use any data type you wish. Declare a two-dimen
    9·1 answer
  • FCAPS is a network management functional model. FCAPS is an acronym that represents the focal tasks necessary to effectively man
    13·1 answer
  • This was the template given for my assignment: class Login:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!