Skip to content
Open

Jd #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions BankApllication.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" packagePrefix="bankapplication" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
71 changes: 5 additions & 66 deletions BankApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,71 +11,10 @@

public class BankApplication {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner input=new Scanner(System.in);
BankingOperation bankingoperation=new BankingOperation();
UserInterest userinterest=new UserInterest();
UserTransactionHistory usertransactionhistory=new UserTransactionHistory();
System.out.println("Welcome to the Nitheesh's online banking service's :");
while(true)
{
try
{
System.out.println("Enter the option for Banking operation");
System.out.println("1.Create new Bank Account");
System.out.println("2.Deposit Your Amount");
System.out.println("3.Withraw Your Amount");
System.out.println("4.To calculate Interest Amount for your Loan");
System.out.println("5.To view Your Account Details");
System.out.println("6.To view you're Transaction History");
System.out.println("7.Exit the Banking operation");
String Userchoice=input.next();
switch(Userchoice)
{
case "1":
bankingoperation.CreateNewBankAccount();
break;
case "2":
bankingoperation.DepositeUserMoney();
break;
case "3":
bankingoperation.WithdrawUserMoney();
break;
case "4":
System.out.println("Please choose the Below option's :\n1.Simple Interest\n2.Compound Interest\n3.Main menu\n4.Exit\n");
String InterestOption=input.next();
switch(InterestOption)
{
case "1":
userinterest.calculatesimpleinterest();
break;
case "2":
userinterest.calculatecompoundinterest();
break;
case "3":
break;
case "4":
System.exit(0);
}
break;
case "5":
bankingoperation.DisplayUserAccountDetails();
break;
case "6":
usertransactionhistory.usertransactionhistory();
break;
case "7":
System.out.println("************ Thank you for using our service! Have a GREAT DAY **************");
System.exit(0);
default:
throw new InValidInputException("Please Enter the correct choice.\n");
}

}
catch(InValidInputException e)
{
System.out.println("You're enter the invalid choice.\n"+e);
InputReader inputReader = new ScannerInputReader();
BankingOperation bankingOperation = new BankingOperation(inputReader);

System.out.println("Welcome to the banking application.");
bankingOperation.performOperation();
}
}
}
}
Loading