#Getters/Setters
1 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @slender wind! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
but i wrote it?
And there are syntax and error highlighting
Still could be errors
this is what i don't understand
i was given this started GUI code and told to fill in the functions
Or you didn't import Property
Show me the property class please. Would also help to see the actual code itself
no problem:
package com.example.proj4;
public class Property {
private String propertyName;
private String city;
private double rentalAmount;
private String owner;
private Plot plot;
public Property() {
propertyName = "";
city = "";
rentalAmount = 0.0;
owner = "";
plot = new Plot();
}
public Property(String propertyName, String city, double rentalAmount, String owner) {
this.propertyName = propertyName;
this.city = city;
this.rentalAmount = rentalAmount;
this.owner = owner;
plot = new Plot();
}
public Property(String propertyName, String city, double rentalAmount, String owner, int x, int y, int width, int depth) {
this.propertyName = propertyName;
this.city = city;
this.rentalAmount = rentalAmount;
this.owner = owner;
plot = new Plot(x, y, width, depth);
}
public Property(Property otherProperty) {
propertyName = otherProperty.propertyName;
city = otherProperty.city;
rentalAmount = otherProperty.rentalAmount;
owner = otherProperty.owner;
plot = new Plot(otherProperty.plot);
}
public Plot getPlot() {
return plot;
}
public String getPropertyName() {
return propertyName;
}
public String getCity() {
return city;
}
public double getRentAmount() {
return rentalAmount;
}
public String getOwner() {
return owner;
}
public String toString() {
return propertyName + "," + city + "," + owner + "," + rentalAmount;
}
}
Show me the class that is giving the errors
https://hastebin.com/share/ixuxebinoc.java
lines:
443, 444
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
2 related problems
Click on the Property data type and hit alt+enter
Show me what it says
alright
it says to rename reference
what should it say
this is what i get hovering over getPlot
Show the ManagementCompany code please
oh, i have not written it, only the Plot.java and Propery.java class only. is that why i am getting the 2 related issues?
It's hard to read the images on mobile. Discord being glitchy lol
But yea, that would make sense
alright, i will write that class and report back if i got issues