import java.util.Scanner; import java.text.*; public class InvestmentAccount { double principal; double interest; int years; public InvestmentAccount(double p,double i) { principal=p; interest=i; years=0; } // Now add a method to the class called addYear() which // computes the new principal from the old principal and // interest as though one year had passed. It should also // increment the value of the years attribute.