Object-Oriented Programming Loan Calculator: MITS4002 Activity 7
VerifiedAdded on 2025/04/29
|6
|363
|191
AI Summary
Desklib provides past papers and solved assignments for students. This solved assignment demonstrates a loan calculator program.

MITS4002 ACTIVITY 7 – OBJECT-ORIENTED SOFTWARE
DEVELOPMENT
DEVELOPMENT
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Table of Contents
MITS4002 ACTIVITY 7 – OBJECT-ORIENTED SOFTWARE DEVELOPMENT....................1
List of Figure...................................................................................................................................2
Analysis...........................................................................................................................................3
Design..............................................................................................................................................3
Coding..............................................................................................................................................3
Output screenshot............................................................................................................................5
Testing.............................................................................................................................................5
List of Figure
Figure 1: Output for Program..........................................................................................................5
Figure 2: Testing Sample.................................................................................................................6
MITS4002 ACTIVITY 7 – OBJECT-ORIENTED SOFTWARE DEVELOPMENT....................1
List of Figure...................................................................................................................................2
Analysis...........................................................................................................................................3
Design..............................................................................................................................................3
Coding..............................................................................................................................................3
Output screenshot............................................................................................................................5
Testing.............................................................................................................................................5
List of Figure
Figure 1: Output for Program..........................................................................................................5
Figure 2: Testing Sample.................................................................................................................6

Analysis
This assignment problem is having the calculation for monthly payment & total complete
payment for the load. This load period is undergone with specific interest rate. The range for the
interest rate is varying from the 5 % to the 8 %, with an increment of 1 / 8 or 0.125. For the
completion of the assignment, you have to take the values from user in term of amount for loan
with the time period in the value of years.
Design
Here, below is the major steps for solving this problem in which I have undergone & these are as
follows:
First of all carefully read the problem and analyze them what are the input values as well as
formula or logic which is used.
After that, take the values from user by using the scanner class & its object or instance.
Now, generate your logic according to the need & requirement of the logic.
After that, perform the various input for proper verification & validation. Such that the quality is
measured & ensured by fulfilling the testing.
Coding
Here, below is the source code of problem statement which is mentioned and it is:
import java.util.*;
import java.lang.*;
public class Activity7{
public static void main(String []args)
{
double amount, year;
double i,finalamount,totalamount;
This assignment problem is having the calculation for monthly payment & total complete
payment for the load. This load period is undergone with specific interest rate. The range for the
interest rate is varying from the 5 % to the 8 %, with an increment of 1 / 8 or 0.125. For the
completion of the assignment, you have to take the values from user in term of amount for loan
with the time period in the value of years.
Design
Here, below is the major steps for solving this problem in which I have undergone & these are as
follows:
First of all carefully read the problem and analyze them what are the input values as well as
formula or logic which is used.
After that, take the values from user by using the scanner class & its object or instance.
Now, generate your logic according to the need & requirement of the logic.
After that, perform the various input for proper verification & validation. Such that the quality is
measured & ensured by fulfilling the testing.
Coding
Here, below is the source code of problem statement which is mentioned and it is:
import java.util.*;
import java.lang.*;
public class Activity7{
public static void main(String []args)
{
double amount, year;
double i,finalamount,totalamount;
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Scanner s = new Scanner(System.in);
System.out.println("Enter Amount");
amount = s.nextDouble();
System.out.println("Enter Year");
year = s.nextDouble();
System.out.println("Interest Rate" + " "+"Monthly Payment" + "
" + "Total Payment");
while(i<=8)
{
finalamount = (amount*0.01*i)/(1-(1/(Math.pow((1+0.01*i),
(12*year)))));
totalamount = finalamount*12*year;
System.out.println( i + " "+ finalamount + " " +
totalamount);
i=i+0.125;
}
}
}
System.out.println("Enter Amount");
amount = s.nextDouble();
System.out.println("Enter Year");
year = s.nextDouble();
System.out.println("Interest Rate" + " "+"Monthly Payment" + "
" + "Total Payment");
while(i<=8)
{
finalamount = (amount*0.01*i)/(1-(1/(Math.pow((1+0.01*i),
(12*year)))));
totalamount = finalamount*12*year;
System.out.println( i + " "+ finalamount + " " +
totalamount);
i=i+0.125;
}
}
}
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Output screenshot
Figure 1: Output for Program
Testing
For the different testing aspect, I have undergone with process of taking all different various
inputs and verified that it is fulfilling all the requirement with the output. And, the formula which
is applied is generating proper output.
Figure 1: Output for Program
Testing
For the different testing aspect, I have undergone with process of taking all different various
inputs and verified that it is fulfilling all the requirement with the output. And, the formula which
is applied is generating proper output.

Figure 2: Testing Sample
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 6
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.