can you help what's wrong with my code can you fix it package com.java; public class Pet{ private String petType; private String petName; private String catSpaces; private int petAge; private int daysStay; private int amountDue; public Pet(String petType_, String petName_, String catSpaces_, int petAge_, int daysStay_, int amountDue_) { this.petType = petType_; this.petName = petName_; this.petAge = petAge_; this.daysStay = daysStay_; this.amountDue = amountDue_; this.catSpaces = catSpaces_; } //Mutate and accessor
can you help what's wrong with my code can you fix it
package com.java;
public class Pet{
private String petType;
private String petName;
private String catSpaces;
private int petAge;
private int daysStay;
private int amountDue;
public Pet(String petType_, String petName_, String catSpaces_, int petAge_, int daysStay_, int amountDue_) {
this.petType = petType_;
this.petName = petName_;
this.petAge = petAge_;
this.daysStay = daysStay_;
this.amountDue = amountDue_;
this.catSpaces = catSpaces_;
}
//Mutate and accessor
public static void main(String[] args) {
}
String getPetType() {
return this.petType;
}
public void setPetType(String petType_) {
this.petType = petType_;
}
String getPetName() {
return this.petName;
}
public void setName(String petName_) {
this.petName = petName_;
}
String getCatSpaces() {
return this.catSpaces;
}
public void setCatSpaces(String catSpaces_) {
this.catSpaces = catSpaces_;
}
int getPetAge() {
return this.petAge;
}
public void setPetAge(int petAge_) {
this.petAge = petAge_;
}
int getDaysStay() {
return this.daysStay;
}
public void setDaysStay(int daysStay_) {
this.daysStay = daysStay_;
}
int getAmountDue() {
return this.amountDue;
}
public void setAmountDue(int amountDue_) {
this.amountDue = amountDue_;
}
public class Cat {
private String petType;
private String petName;
private int petAge;
private int daysStay;
private int amountDue;
private String catSpaces;
private Object catSpaceNumber;
String getPetType() {
return this.petType;
}
public void setPetType(String petType) {
this.petType = petType;
}
String getPetName() {
return this.petName;
}
public void setPetName(String petName) {
this.petName = petName;
}
int getPetAge() {
return this.petAge;
}
public void petAge(int petAge) {
this.petAge = petAge;
}
String getCatSpaces() {
return this.getCatSpaces();
}
public void setDogSpaces(String catSpaces) {
this.catSpaces = catSpaces;
}
int getDaysStay() {
return this.getDaysStay();
}
public void setDaysStay(int daysStay) {
this.daysStay = daysStay;
}
int getAmountDue() {
return this.getAmountDue();
}
public void setAmountDue(int amountDue) {
this.amountDue = amountDue;
}
public Cat(String petType_, String petName_, String catSpaces_, int petAge_, int daysStay_, int amountDue_, int catSpaceNumber_) {
Super(petType_, petName_, catSpaces_, petAge_, daysStay_, amountDue_);
}
public Cat(String string, String string2, String string3, int i, int j, double d) {
// TODO Auto-generated constructor stub
}
private void Super(String petType_, String petName_, String catSpaces_, int petAge_, int daysStay_,
int amountDue_) {
// TODO Auto-generated method stub
}
int getDogSpaceNumber() {
return (int) this.catSpaceNumber;
}
public void setCatSpaceNumber(int catSpaceNumber) {
}
public class PetDetails {
}
public void main(String[] args) {
Cat cat = new Cat("Cat", "Bob", "Boxer", 14, 8, 7.);
System.out.println(cat); {
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps