Question: Please help me fix the code. The error shows that PersonApp.java:48: error: expected return(name.equalsIgnoreCase(new(PersonApp)anotherPerson).name) ^ PersonApp.java:48: error: ')' expected return(name.equalsIgnoreCase(new(PersonApp)anotherPerson).name) ^ PersonApp.java:48: error: ';' expected

Please help me fix the code. The error shows that

PersonApp.java:48: error: expected return(name.equalsIgnoreCase(new(PersonApp)anotherPerson).name) ^ PersonApp.java:48: error: ')' expected return(name.equalsIgnoreCase(new(PersonApp)anotherPerson).name) ^ PersonApp.java:48: error: ';' expected return(name.equalsIgnoreCase(new(PersonApp)anotherPerson).name) ^ PersonApp.java:48: error: not a statement return(name.equalsIgnoreCase(new(PersonApp)anotherPerson).name) ^ PersonApp.java:48: error: ';' expected return(name.equalsIgnoreCase(new(PersonApp)anotherPerson).name) ^ PersonApp.java:50: error: not a statement && Math.abs(income - ((PersonApp)anotherPerson).income Please help me fix the code. The error shows that PersonApp.java:48: error:

public class PersonApp { private String name; private int age; private double income; public PersonApp () = name age = i income = 0.0; } public PersonApp (String n, int a, double i) { name = n; age = a; income = i; } public String getName() { return name; } public int getAge() { return age; } public double getIncome () { return income; } public void setName (String n) { name = n; } public void setAge(int a) { age = a; } public void setIncome (double i) { income = i; } public boolean equals (Object another Person) { return (name.equalsIgnorecase ((PersonApp) anotherPerson).name) && age == ((PersonApp) another person.age) && Math.abs (income ((PersonApp) another Person).income

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!