import javax.swing.*; // library defining JOptionPane    

class Investment {
  public static void main(String[] args)
    {
        double endValue, initInvest, annPercentRate;
        int years;


        // get initInvest,annPercentRate and years using an InputDialogBox


           String initInvestStr, annPercentRateStr,yearsStr;
           initInvestStr = JOptionPane.showInputDialog(null,"Enter Initial Investment:");
           annPercentRateStr = JOptionPane.showInputDialog(null,"Enter Annual Percentage Rate:");
           yearsStr = JOptionPane.showInputDialog(null,"Enter Number of Years:");

        // Convert to numbers
         
           initInvest = Double.parseDouble(initInvestStr);
           annPercentRate = Double.parseDouble(annPercentRateStr);
           years = Integer.parseInt(yearsStr);

        // Quick check that data is input correctly
           System.out.println(initInvest + " " + annPercentRate + " " + years);

        // Compute endValue

        // Display endValue using a MessageDialogBox

           System.exit(0);
    }
}