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; } public void addYear() { double multiplier=1.0+interest; principal = principal * multiplier; years++; } // Finally, add another constructor that uses a Scanner // object to get information from the user, instead of using // formal parameters to pass in the information. }