SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
public abstract class Animal {
public abstract void eat();
public abstract void move();
}
public abstract class Mammal extends Animal {
public abstract void giveBirth();
public abstract void takeTemp();
}
public abstract class Reptile extends Animal {
public abstract void layEggs();
public abstract void regulateTemp();
}
Please finish these three classes
Dog.java
// TO DO: Make Dog.java extend Animal and Mammal.
// Implement giveBirth()
// print "Bow wowwwww did it hurt to have these puppies."
// Implement takeTemp()
// print "I should have a temperature around 101.0 to 102.5F."
// Implement eat()
// Print "Yum, I love kibbles and bits."
// Implement move()
// print "I love to run, jump, roll and play."
Snake.java
// TO DO: Make Snake.java extend Animal and Reptile.
// Implement layEggs()
// print "Hisssss did it hurt to lay all these eggs."
// Implement regulateTemp()
// print "I better find a sunny spot. I'm starting to get cold."
// Implement eat()
// Print "Yum, I love mice and frogs and other small things."
// Implement move()
// print "I love to slither and slide and sidewind."
public class Driver {
public static void main(String[] args) {
//TO DO: create a Dog object
//TO DO: create a Snake object
//TO DO: put both dog and snake into the same array
// Iterate through the array, and call the methods
// eat, move, giveBirth, takeTemp, layEggs, and regulateTemp
// on the array items.
}
}
Abstract classes Animal, Mammal, and Reptile are written for you. Your first goal is to
implement Dog and Snake. - Dog should inherit from Animal and Mammal. Method instructions
are provided in the class. - Snake should inherit from Animal and Reptile. Method instructions
are provided in the class. Then, complete the Driver. The instructions are provided inside the
class. When it is written correctly, your Driver should output: Yum, I love kibbles and bits. I
love to run, jump, roll and play. Bow wowwww did it hurt to have these puppies. I should have a
temperature around 101.0 to 102.5F. Yum, I love mice and frogs and other small things. I love to
slither and slide and sidewind. Hisssss did it hurt to lay all these eggs. I better find a sunny spot.
I'm starting to get cold.

Weitere ähnliche Inhalte

Mehr von alsofshionchennai

Project ScenarioPecos Company acquired 100 percent of Suaros outs.pdf
Project ScenarioPecos Company acquired 100 percent of Suaros outs.pdfProject ScenarioPecos Company acquired 100 percent of Suaros outs.pdf
Project ScenarioPecos Company acquired 100 percent of Suaros outs.pdfalsofshionchennai
 
Professor Jones is very particular when it comes to his morning coff.pdf
Professor Jones is very particular when it comes to his morning coff.pdfProfessor Jones is very particular when it comes to his morning coff.pdf
Professor Jones is very particular when it comes to his morning coff.pdfalsofshionchennai
 
Program Specifications ( please show full working code that builds s.pdf
Program Specifications ( please show full working code that builds s.pdfProgram Specifications ( please show full working code that builds s.pdf
Program Specifications ( please show full working code that builds s.pdfalsofshionchennai
 
Productos m�dicos de Penner El lunes 14 de abril, Neil Bennett, Ge.pdf
Productos m�dicos de Penner El lunes 14 de abril, Neil Bennett, Ge.pdfProductos m�dicos de Penner El lunes 14 de abril, Neil Bennett, Ge.pdf
Productos m�dicos de Penner El lunes 14 de abril, Neil Bennett, Ge.pdfalsofshionchennai
 
P�Pa+Ba Hice bit Holndsiteur soors places at Non bed.pdf
P�Pa+Ba Hice bit Holndsiteur soors places at Non bed.pdfP�Pa+Ba Hice bit Holndsiteur soors places at Non bed.pdf
P�Pa+Ba Hice bit Holndsiteur soors places at Non bed.pdfalsofshionchennai
 
Q1.7. What would happen if you could magically turn off decompositio.pdf
Q1.7. What would happen if you could magically turn off decompositio.pdfQ1.7. What would happen if you could magically turn off decompositio.pdf
Q1.7. What would happen if you could magically turn off decompositio.pdfalsofshionchennai
 
Progressive Corporation (a property and casualty insurance company) .pdf
Progressive Corporation (a property and casualty insurance company) .pdfProgressive Corporation (a property and casualty insurance company) .pdf
Progressive Corporation (a property and casualty insurance company) .pdfalsofshionchennai
 
Q1. (a) Briefly introduce how Force-directed algorithms encode netwo.pdf
Q1. (a) Briefly introduce how Force-directed algorithms encode netwo.pdfQ1. (a) Briefly introduce how Force-directed algorithms encode netwo.pdf
Q1. (a) Briefly introduce how Force-directed algorithms encode netwo.pdfalsofshionchennai
 
Q1. part A. can we use if statement and skip else part(ye.pdf
Q1. part A. can we use if statement and skip else part(ye.pdfQ1. part A. can we use if statement and skip else part(ye.pdf
Q1. part A. can we use if statement and skip else part(ye.pdfalsofshionchennai
 
Q1. Fiscal policy is often focused on replacing spending that is no.pdf
Q1.  Fiscal policy is often focused on replacing spending that is no.pdfQ1.  Fiscal policy is often focused on replacing spending that is no.pdf
Q1. Fiscal policy is often focused on replacing spending that is no.pdfalsofshionchennai
 
Q1 Which of the following would be considered a transport epithelium.pdf
Q1 Which of the following would be considered a transport epithelium.pdfQ1 Which of the following would be considered a transport epithelium.pdf
Q1 Which of the following would be considered a transport epithelium.pdfalsofshionchennai
 
Q1 Find two thoracic vertebrae that fit together and identify .pdf
Q1 Find two thoracic vertebrae that fit together and identify .pdfQ1 Find two thoracic vertebrae that fit together and identify .pdf
Q1 Find two thoracic vertebrae that fit together and identify .pdfalsofshionchennai
 
Q-1. �El FMI a menudo es visto como el prestamista de �ltimo recurso.pdf
Q-1. �El FMI a menudo es visto como el prestamista de �ltimo recurso.pdfQ-1. �El FMI a menudo es visto como el prestamista de �ltimo recurso.pdf
Q-1. �El FMI a menudo es visto como el prestamista de �ltimo recurso.pdfalsofshionchennai
 
Q1 Write an MPI program that can measure the time for sending and r.pdf
Q1 Write an MPI program that can measure the time for sending and r.pdfQ1 Write an MPI program that can measure the time for sending and r.pdf
Q1 Write an MPI program that can measure the time for sending and r.pdfalsofshionchennai
 
Q1 Choose only three of the following theories and provide proof..pdf
Q1 Choose only three of the following theories and provide proof..pdfQ1 Choose only three of the following theories and provide proof..pdf
Q1 Choose only three of the following theories and provide proof..pdfalsofshionchennai
 
P[Y1] (b) P[Y1] (d) P[Y2] (f) P[Y=3].pdf
P[Y1] (b) P[Y1] (d) P[Y2] (f) P[Y=3].pdfP[Y1] (b) P[Y1] (d) P[Y2] (f) P[Y=3].pdf
P[Y1] (b) P[Y1] (d) P[Y2] (f) P[Y=3].pdfalsofshionchennai
 
Q Differentiate between data, information, and knowledge.pdf
Q Differentiate between data, information, and knowledge.pdfQ Differentiate between data, information, and knowledge.pdf
Q Differentiate between data, information, and knowledge.pdfalsofshionchennai
 
Python programUse this list of friends and agesFriends = [ St.pdf
Python programUse this list of friends and agesFriends = [ St.pdfPython programUse this list of friends and agesFriends = [ St.pdf
Python programUse this list of friends and agesFriends = [ St.pdfalsofshionchennai
 
PYTHON ONLY Define a function named swap_values that takes four inte.pdf
PYTHON ONLY Define a function named swap_values that takes four inte.pdfPYTHON ONLY Define a function named swap_values that takes four inte.pdf
PYTHON ONLY Define a function named swap_values that takes four inte.pdfalsofshionchennai
 
Python code for this linear regression. yihat is in a matrix Yhat, a.pdf
Python code for this linear regression. yihat is in a matrix Yhat, a.pdfPython code for this linear regression. yihat is in a matrix Yhat, a.pdf
Python code for this linear regression. yihat is in a matrix Yhat, a.pdfalsofshionchennai
 

Mehr von alsofshionchennai (20)

Project ScenarioPecos Company acquired 100 percent of Suaros outs.pdf
Project ScenarioPecos Company acquired 100 percent of Suaros outs.pdfProject ScenarioPecos Company acquired 100 percent of Suaros outs.pdf
Project ScenarioPecos Company acquired 100 percent of Suaros outs.pdf
 
Professor Jones is very particular when it comes to his morning coff.pdf
Professor Jones is very particular when it comes to his morning coff.pdfProfessor Jones is very particular when it comes to his morning coff.pdf
Professor Jones is very particular when it comes to his morning coff.pdf
 
Program Specifications ( please show full working code that builds s.pdf
Program Specifications ( please show full working code that builds s.pdfProgram Specifications ( please show full working code that builds s.pdf
Program Specifications ( please show full working code that builds s.pdf
 
Productos m�dicos de Penner El lunes 14 de abril, Neil Bennett, Ge.pdf
Productos m�dicos de Penner El lunes 14 de abril, Neil Bennett, Ge.pdfProductos m�dicos de Penner El lunes 14 de abril, Neil Bennett, Ge.pdf
Productos m�dicos de Penner El lunes 14 de abril, Neil Bennett, Ge.pdf
 
P�Pa+Ba Hice bit Holndsiteur soors places at Non bed.pdf
P�Pa+Ba Hice bit Holndsiteur soors places at Non bed.pdfP�Pa+Ba Hice bit Holndsiteur soors places at Non bed.pdf
P�Pa+Ba Hice bit Holndsiteur soors places at Non bed.pdf
 
Q1.7. What would happen if you could magically turn off decompositio.pdf
Q1.7. What would happen if you could magically turn off decompositio.pdfQ1.7. What would happen if you could magically turn off decompositio.pdf
Q1.7. What would happen if you could magically turn off decompositio.pdf
 
Progressive Corporation (a property and casualty insurance company) .pdf
Progressive Corporation (a property and casualty insurance company) .pdfProgressive Corporation (a property and casualty insurance company) .pdf
Progressive Corporation (a property and casualty insurance company) .pdf
 
Q1. (a) Briefly introduce how Force-directed algorithms encode netwo.pdf
Q1. (a) Briefly introduce how Force-directed algorithms encode netwo.pdfQ1. (a) Briefly introduce how Force-directed algorithms encode netwo.pdf
Q1. (a) Briefly introduce how Force-directed algorithms encode netwo.pdf
 
Q1. part A. can we use if statement and skip else part(ye.pdf
Q1. part A. can we use if statement and skip else part(ye.pdfQ1. part A. can we use if statement and skip else part(ye.pdf
Q1. part A. can we use if statement and skip else part(ye.pdf
 
Q1. Fiscal policy is often focused on replacing spending that is no.pdf
Q1.  Fiscal policy is often focused on replacing spending that is no.pdfQ1.  Fiscal policy is often focused on replacing spending that is no.pdf
Q1. Fiscal policy is often focused on replacing spending that is no.pdf
 
Q1 Which of the following would be considered a transport epithelium.pdf
Q1 Which of the following would be considered a transport epithelium.pdfQ1 Which of the following would be considered a transport epithelium.pdf
Q1 Which of the following would be considered a transport epithelium.pdf
 
Q1 Find two thoracic vertebrae that fit together and identify .pdf
Q1 Find two thoracic vertebrae that fit together and identify .pdfQ1 Find two thoracic vertebrae that fit together and identify .pdf
Q1 Find two thoracic vertebrae that fit together and identify .pdf
 
Q-1. �El FMI a menudo es visto como el prestamista de �ltimo recurso.pdf
Q-1. �El FMI a menudo es visto como el prestamista de �ltimo recurso.pdfQ-1. �El FMI a menudo es visto como el prestamista de �ltimo recurso.pdf
Q-1. �El FMI a menudo es visto como el prestamista de �ltimo recurso.pdf
 
Q1 Write an MPI program that can measure the time for sending and r.pdf
Q1 Write an MPI program that can measure the time for sending and r.pdfQ1 Write an MPI program that can measure the time for sending and r.pdf
Q1 Write an MPI program that can measure the time for sending and r.pdf
 
Q1 Choose only three of the following theories and provide proof..pdf
Q1 Choose only three of the following theories and provide proof..pdfQ1 Choose only three of the following theories and provide proof..pdf
Q1 Choose only three of the following theories and provide proof..pdf
 
P[Y1] (b) P[Y1] (d) P[Y2] (f) P[Y=3].pdf
P[Y1] (b) P[Y1] (d) P[Y2] (f) P[Y=3].pdfP[Y1] (b) P[Y1] (d) P[Y2] (f) P[Y=3].pdf
P[Y1] (b) P[Y1] (d) P[Y2] (f) P[Y=3].pdf
 
Q Differentiate between data, information, and knowledge.pdf
Q Differentiate between data, information, and knowledge.pdfQ Differentiate between data, information, and knowledge.pdf
Q Differentiate between data, information, and knowledge.pdf
 
Python programUse this list of friends and agesFriends = [ St.pdf
Python programUse this list of friends and agesFriends = [ St.pdfPython programUse this list of friends and agesFriends = [ St.pdf
Python programUse this list of friends and agesFriends = [ St.pdf
 
PYTHON ONLY Define a function named swap_values that takes four inte.pdf
PYTHON ONLY Define a function named swap_values that takes four inte.pdfPYTHON ONLY Define a function named swap_values that takes four inte.pdf
PYTHON ONLY Define a function named swap_values that takes four inte.pdf
 
Python code for this linear regression. yihat is in a matrix Yhat, a.pdf
Python code for this linear regression. yihat is in a matrix Yhat, a.pdfPython code for this linear regression. yihat is in a matrix Yhat, a.pdf
Python code for this linear regression. yihat is in a matrix Yhat, a.pdf
 

Kürzlich hochgeladen

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 

Kürzlich hochgeladen (20)

FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 

public abstract class Animal { public abstract void eat(); .pdf

  • 1. public abstract class Animal { public abstract void eat(); public abstract void move(); } public abstract class Mammal extends Animal { public abstract void giveBirth(); public abstract void takeTemp(); } public abstract class Reptile extends Animal { public abstract void layEggs(); public abstract void regulateTemp(); } Please finish these three classes Dog.java // TO DO: Make Dog.java extend Animal and Mammal. // Implement giveBirth() // print "Bow wowwwww did it hurt to have these puppies." // Implement takeTemp() // print "I should have a temperature around 101.0 to 102.5F." // Implement eat() // Print "Yum, I love kibbles and bits." // Implement move() // print "I love to run, jump, roll and play." Snake.java // TO DO: Make Snake.java extend Animal and Reptile. // Implement layEggs() // print "Hisssss did it hurt to lay all these eggs." // Implement regulateTemp() // print "I better find a sunny spot. I'm starting to get cold."
  • 2. // Implement eat() // Print "Yum, I love mice and frogs and other small things." // Implement move() // print "I love to slither and slide and sidewind." public class Driver { public static void main(String[] args) { //TO DO: create a Dog object //TO DO: create a Snake object //TO DO: put both dog and snake into the same array // Iterate through the array, and call the methods // eat, move, giveBirth, takeTemp, layEggs, and regulateTemp // on the array items. } } Abstract classes Animal, Mammal, and Reptile are written for you. Your first goal is to implement Dog and Snake. - Dog should inherit from Animal and Mammal. Method instructions are provided in the class. - Snake should inherit from Animal and Reptile. Method instructions are provided in the class. Then, complete the Driver. The instructions are provided inside the class. When it is written correctly, your Driver should output: Yum, I love kibbles and bits. I love to run, jump, roll and play. Bow wowwww did it hurt to have these puppies. I should have a temperature around 101.0 to 102.5F. Yum, I love mice and frogs and other small things. I love to slither and slide and sidewind. Hisssss did it hurt to lay all these eggs. I better find a sunny spot.
  • 3. I'm starting to get cold.