MITS4002 Activity 03: Future Investment Value Calculator Project
VerifiedAdded on 2025/04/28
|5
|437
|282
AI Summary
Desklib provides past papers and solved assignments for students. This project demonstrates a Java-based investment calculator.

MITS4002 Activity 03
MITS4002
OBJECT-ORIENTED SOFTWARE
DEVELOPMENT
Activity 03
Project: Calculating Future Investment Value
Student ID:
Copyright © 2015-2019 VIT, All Rights Reserved. Page 1
MITS4002
OBJECT-ORIENTED SOFTWARE
DEVELOPMENT
Activity 03
Project: Calculating Future Investment Value
Student ID:
Copyright © 2015-2019 VIT, All Rights Reserved. Page 1
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

MITS4002 Activity 03
Student full name:
Total Points (20 pts):
Table of Contents
1. Analysis.......................................................................................................................................3
2. Design..........................................................................................................................................3
3. Code.............................................................................................................................................3
4. Output Screenshot:......................................................................................................................5
5. Testing:........................................................................................................................................5
Copyright © 2015-2019 VIT, All Rights Reserved. Page 2
Student full name:
Total Points (20 pts):
Table of Contents
1. Analysis.......................................................................................................................................3
2. Design..........................................................................................................................................3
3. Code.............................................................................................................................................3
4. Output Screenshot:......................................................................................................................5
5. Testing:........................................................................................................................................5
Copyright © 2015-2019 VIT, All Rights Reserved. Page 2

MITS4002 Activity 03
1. Analysis
This program will be about the calculation of future investment which can be possible with
investment amount, monthly rates of interest and years which are being taken by user or
programmer. After that investment value which will be achieved in the future will be calculated
from the above input values and on the basis of a formula which was given in workbook.
2. Design
Design of the program is being done according to the criteria described below:
Top to down approach is being used in this program.
Variables which are used in this program which could be used as an input or not is being defined
before it's use
For taking input in java .util.Scanner library is used in this program with the Scanner method.
Power function of java.lang.Math library is being used for calculating a number of years which is
in power of monthly interest rates.
Value of future investment will be calculated according to the formula given for future
investment value calculation.
3. Code
import java.lang.Math;
import java.util.Scanner;
public class Investment_calculator
{
public static void main(String[] args) {
double amt_investment, mo_int_rate, no_of_years,
future_investment_value;
// Defining object 'input' of Scanner Class
Scanner input = new Scanner(System.in);
// Asking user to enter investment amount
Copyright © 2015-2019 VIT, All Rights Reserved. Page 3
1. Analysis
This program will be about the calculation of future investment which can be possible with
investment amount, monthly rates of interest and years which are being taken by user or
programmer. After that investment value which will be achieved in the future will be calculated
from the above input values and on the basis of a formula which was given in workbook.
2. Design
Design of the program is being done according to the criteria described below:
Top to down approach is being used in this program.
Variables which are used in this program which could be used as an input or not is being defined
before it's use
For taking input in java .util.Scanner library is used in this program with the Scanner method.
Power function of java.lang.Math library is being used for calculating a number of years which is
in power of monthly interest rates.
Value of future investment will be calculated according to the formula given for future
investment value calculation.
3. Code
import java.lang.Math;
import java.util.Scanner;
public class Investment_calculator
{
public static void main(String[] args) {
double amt_investment, mo_int_rate, no_of_years,
future_investment_value;
// Defining object 'input' of Scanner Class
Scanner input = new Scanner(System.in);
// Asking user to enter investment amount
Copyright © 2015-2019 VIT, All Rights Reserved. Page 3
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

MITS4002 Activity 03
System.out.println("Enter Investment Amount: ");
amt_investment = input.nextDouble();
// Asking user to enter Annual interest rate
System.out.println("Interst rate annually :");
mo_int_rate = input.nextDouble();
// Asking user to enter years
System.out.println("No. of years: ");
no_of_years = input.nextDouble();
// calculation of m0_interest rate
mo_int_rate = (1+ mo_int_rate/100);
// Converting number of years
no_of_years = no_of_years*12;
// Calculating monthly interst rate with power of number of years
mo_int_rate = Math.pow(mo_int_rate, no_of_years);
// Calulaing investment values which will be provided in future
future_investment_value = amt_investment * mo_int_rate;
// Printing the future value of investment
System.out.println("Accumulated values in future is "+
future_investment_value);
}
Copyright © 2015-2019 VIT, All Rights Reserved. Page 4
System.out.println("Enter Investment Amount: ");
amt_investment = input.nextDouble();
// Asking user to enter Annual interest rate
System.out.println("Interst rate annually :");
mo_int_rate = input.nextDouble();
// Asking user to enter years
System.out.println("No. of years: ");
no_of_years = input.nextDouble();
// calculation of m0_interest rate
mo_int_rate = (1+ mo_int_rate/100);
// Converting number of years
no_of_years = no_of_years*12;
// Calculating monthly interst rate with power of number of years
mo_int_rate = Math.pow(mo_int_rate, no_of_years);
// Calulaing investment values which will be provided in future
future_investment_value = amt_investment * mo_int_rate;
// Printing the future value of investment
System.out.println("Accumulated values in future is "+
future_investment_value);
}
Copyright © 2015-2019 VIT, All Rights Reserved. Page 4
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

MITS4002 Activity 03
}
4. Output Screenshot:
Figure 1 investment calculator
5. Testing:
In the program values will be checked by providing different inputs to each different
variables.
The error will be generated by error if any false or wrong input is being provided to the
program.
Copyright © 2015-2019 VIT, All Rights Reserved. Page 5
}
4. Output Screenshot:
Figure 1 investment calculator
5. Testing:
In the program values will be checked by providing different inputs to each different
variables.
The error will be generated by error if any false or wrong input is being provided to the
program.
Copyright © 2015-2019 VIT, All Rights Reserved. Page 5
1 out of 5
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.