import java.util.Scanner; //för att kunna mata in från tangentbordet
/**
 * Write a description of class Person here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Person {
    private String name;
    private String address;
    private double age;
    private double income;
    private int telephoneNr;
 
    public void newCitizen(String theName, String theAddress, double theAge) {
        name = theName;
        address = theAddress;
        age = theAge;    
    }

    public void move(String newAddress) {
        address = newAddress;
    }

    public void happyBirthday() {
        age = age + 1;
        if (age < 120)
           System.out.println("CONGRATULATION! Your new age is " + age);
        else
           System.out.println("We express our sympathy!");
    }

    // Metoden beräknar antal veckor personen levt 
    public void weeks() {
        double w;
        w = age*52;
        System.out.println(name + " has lived " + w + " weeks.");
    } 
    
    public void info() {
        System.out.println("Name: " + name);
        System.out.println("Address: " + address);
        System.out.println("Income: " + income);
    }
    
    public void newIncome() {
        Scanner scan = new Scanner(System.in); //skapa ett Scanner-objekt
        System.out.println("Your new income: ");
        double newInc = scan.nextDouble();     //mata in från tangentbordet
        income = newInc;
    }

    public void newTelephone(int tel) {
        telephoneNr = tel;
    }
}
        

