Hi i have other problems in other class the questions is
The Person class
Create a class called "Person" that includes three pieces of information as instance variables: a name, address, and age. Your class should have a constructor that initializes the three instance variables. Provide a set and get method for each instance variable. If the age is not positive, set it to zero.
Write a test application named UsePerson that demonstrate the class you just created. Create two person objects and display each object's information. Then increment the age of the person by 5 years and display each person's info again.
What i did is all the things exept the increase 5 years i don't know how to do it if i put add it will increase it to much not 5 years
take a look to my cood
public class Person {
private String name;
private String address;
private double age;
public Person(){
this.name = "";
this.address = "";
this.age = 0.0;
}
// non\default Constructor
public Person (String name, String address, double age){
this.name = name;
this.address = address;
this.age = age;
if (age < 0)
age = 0.0;
}
public void setName (String name)
{
this.name = name;
}
public String getName (){
return name;
}
public void setAddress (String address){
this.address = address;
}
public String getAddress ()
{
return address;
}
public void setage (double age){
this.age = age;
}
public double getage ()
{
return age;
}
public void adjustAge(double increment){
this.age = (this.age * increment) + this.age;
}
public String toString(){
String output = "";
output += "\nPersons Information: ";
output += "\nPerson Name: " + this.name;
output += "\nPerson Address: " + this.address;
output += "\nPerson Age: " + this.age;
return output;
}
}
public class UsePerson {
public static void main(String[] args) {
Person sameer = new Person (" Sameer ", " 419 W.Linconln Rd ", 29);
Person Kail = new Person (" Kail ", " 604 Wachinton St ", 26);
System.out.println(sameer);
System.out.println(Kail);
System.out.println(" \nIncrease the Age for the first person ");
sameer.adjustAge(+ 0.05);
System.out.println(sameer);
}
}