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
olganol [36]
2 years ago
7

Create a Pet class that keeps track of the name, age, weight, type of animal, and breed for records at an animal clinic with 2 c

onstructors, accessor (get) methods, a toString method, and mutator (set) methods for each instance variable.
Computers and Technology
1 answer:
kati45 [8]2 years ago
4 0

Answer:

class Pet():

   def __init__(self, name, age, weight, animal_type, breed):

       self.name = name

       self.age = age

       self.weight = weight

       slef.aT = animal_type

       self.breed = breed

   def set_name(self, name):

       self.name = name

   def get_name(self):

       return self.name

   def set_age(self, age):

       self.age = age

   def get_age(self):

       return self.age

   def set_weight(self, weight):

       self.weight = weight

   def get_weight(self):

       return self.weight

   def set_Type(self, type):

       self.aT = type

   def get_Type(self):

       return self.aT

   def set_breed(self, breed):

       self.breed = breed

   def get_breed(self):

       return self.breed

   def toString(self):

       print(f"The pet {self.name} is {self.age} year old and weighs {self.weight}lbs. The pet is a {self.breed} breed of {self.aT}.")

Explanation:

The python program defines a class called Pet that has five features namely name, age, weight, animal_type, and breed of the animal. The set and get methods of the class are the mutators and accessor respectively. The final method of the class is the 'toString' method that prints the summary of the Pet object instance.

You might be interested in
Which of the following statements is true?
Luden [163]

Answer:

Option (A) int expressions are always computed exactly; but float expressions can suffer round-off error.

Explanation:

Round - Off Error can be defined as the digital computers have limitations on denoting the decimal numbers,  due to this the floating point numbers have to be rounded off or even it is represented exactly after the calculation on the numbers the resulting number has to be adjusted / rounded off according to the specified precision. The resulted number has to be rounded off back to the required precision, this leads to the round off errors in digital computers. As integers don't need to go through the rounding off in computers, the integer numbers don't have round off errors, only floating point numbers have round off errors. So, options (B) , (C) and (D) are false.

6 0
3 years ago
How does entertainment relate to coding?
liberstina [14]

Answer:

not sure if this is the type of answer you're looking for but: Entertainment can relate to coding because in TV shows and movies, there is lots of editing. Especially with cartoons. Inorder to make these, we have to use coding. This can even relate to real life plays and preformenses depending on how much technology you use to preform them.

3 0
2 years ago
The answer is D!!Readable code includes
nikitadnepr [17]
Ok but don't understand.
3 0
2 years ago
Read 2 more answers
Why is project scope management so challenging in IT projects? What suggestions do you have for preventing scope creep in projec
seropon [69]

Answer:

Explanation:

<u>Ways to Avoid Scope Creep</u>

Scope creep is what happens when changes are made to the scope of a project without any control. Changes happen to projects all the time without been notify ontime as a project manager. It is that very rare project that ends up delivering exactly what was asked for on the first day. However, without there being some control over the changes, a project manager has little chance of keeping on top of the work and managing the project effectively.

Generally, scope creep is when new requirements are added after the project has commence. These changes are not properly reviewed. The project team is expected to deliver them with the same resources and in the same time as the original scope.

On the other hand, as a project manager you could end up with a project with lots of approved, considered changes, that never ends because every time you think you have finished a new requirement arrives in your inbox and you have to make more changes.

The following are five ways to keep control of your project.

<em>1-Document the Requirements</em>

<em>2-Set up Change Control Processes</em>

<em>3-Create a Clear Project Schedule</em>

<em>4-Verify the Scope with the Stakeholders</em>

<em>5-Engage the Project Team</em>

6 0
2 years ago
4. A friend knows you are taking a technology class in college and asks you how a hard drive works. In your own words, describe
sveticcg [70]
Keep it simple... it holds whatever info' you want. would he/she understand?


3 0
2 years ago
Read 2 more answers
Other questions:
  • Who would like to join a team devoted to decreasing spam and bullying?
    5·1 answer
  • This is not an appropriate business use for a wiki. editing corporate documents getting customer feedback project management pub
    11·1 answer
  • The ---------------initiates a message by encoding theidea (or a thought) in words or symbols and sends it to areceiver.ChannelS
    10·1 answer
  • Bob works in a small office with a network of computers. Bob, along with all the other employees, is responsible for securing hi
    5·1 answer
  • A browser is used for creating Web pages. true or false?
    5·2 answers
  • If the starting address location changes, in which of the following cases, the program has to be recompiled? Select one: a. Both
    12·1 answer
  • Arrange the computers in the order fastest to slowest: Minicomputer, Supercomputer, Personal Computer and Mainframe.
    9·1 answer
  • How bridges are built over water
    14·1 answer
  • A leading pharmaceutical company is launching a major transformation of its entire Cloud operations in order to more quickly and
    6·1 answer
  • How many residues separate amino acids that are stabilized by hydrogen bonds in α helices?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!