Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Please help with this error. I have 2 seperate files pet.java and dog.java. I don't know what code I'm missing or how to resolve the errors, I've been at this for 3 days trying to trouble shoot.
I wrote the code and everything passed except I keep getting below errors:
Class Definition: Please click next for more feedback. If you review the UML diagram you will find that the classes are to be in separate class files.
Class found, not "Dog" (case-sensitive)
// pet.java
public class Pet {
private String petType;
private String petName;
private int dogSpaces;
private int catSpaces;
private int petAge;
private int daysStay;
private double amountDue;
// constructor
public Pet (String petType, String petName, int dogSpaces, int catSpaces, int petAge, int dogsStay, double amountDue)
{
}
/**
* @return the petType
*/
public String getPetType() {
return petType;
}
/**
* @return the petName
*/
public String getPetName() {
return petName;
}
/**
* @return the petAge
*/
public int getPetAge() {
return petAge;
}
/**
* @return the dogSpaces
*/
public int getDogSpaces() {
return dogSpaces;
}
/**
* @return the catSpaces
*/
public int getCatSpaces() {
return catSpaces;
}
/**
* @return the daysStay
*/
public int getDaysStay() {
return daysStay;
}
/**
* @return the amountDue
*/
public double getAmountDue() {
return amountDue;
}
/**
* @param petType the petType to set
*/
public void setPetType(String petType) {
this.petType = petType;
}
/**
* @param petName the petName to set
*/
public void setPetName(String petName) {
this.petName = petName;
}
/**
* @param petAge the petAge to set
*/
public void setPetAge(int petAge) {
this.petAge = petAge;
}
/**
* @param dogSpaces the dogSpaces to set
*/
public void setdogSpaces(int dogSpaces) {
this.dogSpaces = dogSpaces;
}
/**
* @param catSpaces the catSpaces to set
*/
public void sectcatSpaces(int catSpaces) {
this.catSpaces = catSpaces;
}
/**
* @param daysStay the daysStay to set
*/
public void setdaysStay(int daysStay) {
this.daysStay = daysStay;
}
/**
* @param amountDue the amountDue to set
*/
public void setAmountDue(double amountDue) {
this.amountDue = amountDue;
}
}
/**
* @author
* dog.java
*/
public class Dog extends Pet{
public Dog(String petType, String petName, int dogSpaces, int catSpaces, int petAge, int dogsStay,double amountDue) {
super(petType, petName, dogSpaces, catSpaces, petAge, dogsStay, amountDue);
this.getPetAge();
// TODO Auto-generated constructor stub
}
public static void main(String[] args) {
}
private int dogSpaceNumber;
private double dogWeight;
private boolean grooming;
/**
*
*/
/**
* @param args
public static void main(String[] args) {
}
*/
/**
* @return the dogSpaceNumber
*/
public int getDogSpaceNumber() {
return dogSpaceNumber;
}
/**
* @param dogSpaceNumber the dogSpaceNumber to set
*/
public void setDogSpaceNumber(int dogSpaceNumber) {
this.dogSpaceNumber = dogSpaceNumber;
}
/**
* @return the dogWeight
*/
public double getDogWeight() {
return dogWeight;
}
/**
* @param dogWeight the dogWeight to set
*/
public void setDogWeight(double dogWeight) {
this.dogWeight = dogWeight;
}
/**
* @return the grooming
*/
public boolean isGrooming() {
return grooming;
}
/**
* @param grooming the grooming to set
*/
public void setGrooming(boolean grooming) {
this.grooming = grooming;
}
}
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 6 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Please you can complete this part of my code almost done, I could not get the output. Please help me to fix this and add part 4 and 5. Part 4 instructions (please see image attached): Implement the relationship between interface and the classes as shown in the diagram below. You must correctly implement appropriate methods in your classesbased on abstraction and interface principles. Part 5 instructions: . Inside the main() method of the Watch class, do the following:a) Create a new instance of the “AnalogWatch” class using the overloaded constructorand assign it to the object reference of type “Watch”.b) Create a new instance of the “DigitalWatch” class using the overloaded constructorand assign it to the object reference of type “Watch”.c) Display the content of both the objects.d) Display the current time using the two objects created above respectively Code: public abstract class Watch { //Data Fields private String brand; private String material; private double…arrow_forwardHi, Please assist with the attached problem. Thanks.arrow_forwardIn JAVA. Help with this would be greatly appreciated! Create the four data classes as above. Do NOT add any attributes or methods that don't appear in the UML diagrams. Create another, executable class named ShipTest as shown below to test these classes. In ShipTest: make two objects with declared type Ship but actual type CruiseShip. make one object of declared type Ship but actual type CargoShip. make one object of declared type CargoShip and actual type CargoShip. make a ship of declared type WarShip and actual type WarShip. using the array initializer syntax, code all of these ships into an array of type Ship named fleet. code a for loop that processes the fleet array to show display all ships and their data. use a method of class Arrays to create an ArrayList of type Ship from the fleet array. pass this ArrayList to a method named shipShow that also displays all ships and returns an integer. report the value of the integer returned by shipShow. In the shipShow method: from…arrow_forward
- Ro-Sham-Bo. Believe it or not, the classic game of Rock-PaperScissors has many other names. One of them is Ro-Sham-Bo. For this assignment, “Ro” will represent “Rock”, “Sham” will represent Paper, and “Bo” will represent Scissors. You will create a RoshamboPlayer class. It will have three attributes: PlayerName: String RoLimit: int ShamBoLimit: int It will also have an overloaded constructor that sets those three values. It will have two functions: playRound that takes in a string and returns a boolean value, and getName that takes in nothing and returns the PlayerName string. In your driver class for this assignment, you will create two RoshamboPlayer objects with the following values: p1: RoLimit == 30, ShamBoLimit == 60 p2: RoLimit = 40, ShamBoLimit = 85 You may name them whatever you like. You will prompt the user to choose one of these two to play against. Then you will create a loop that prompt the user to either play a round of Roshambo, or quit the game. If the user chooses…arrow_forwardThe first question is a prerequisite to the second. Please answer the second question.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education