diff --git a/AskAccount.java b/AskAccount.java new file mode 100644 index 0000000..1471ab5 --- /dev/null +++ b/AskAccount.java @@ -0,0 +1,22 @@ +package Project; + +import java.util.Scanner; + +public class AskAccount { + + public static void whichacc() { + @SuppressWarnings("resource") + Scanner sc = new Scanner(System.in); + if(Project.Login.ll.size()!=1) { + System.out.println("**Select Account**"); + for(int i=0;i bal, double d,int a) { + System.out.println("*Check balance*"); + System.out.println(bal.peek()); + d=(double) bal.peek(); + + } + static void fundTrans(Stack history,double d,int a, Stack bal) { + System.out.println("*Fund Transfer*"); + System.out.println("1. Withdraw"); + System.out.println("2. Deposit"); + System.out.println("Enter your choice :"); + int ch3 = sc.nextInt(); + switch(ch3) + { + case 1: + System.out.println("*Withdraw*"); + System.out.println("Enter the amount"); + double w = sc.nextInt(); + history.add(-w); + if(w history, @SuppressWarnings("rawtypes") ArrayList History, int a) { + System.out.println("*Transaction History*"); + for(int i=0;i<=History.size();i++) { + if(i==a) { + History.add(history); + } + } + Project.Login.display(history); + + } + static void Loan(Stack bal) { + System.out.println("Loan"); + //System.out.println("Enter account number"); + AskAccount.whichacc(); + System.out.println("Enter the Loan Amount : "); + int loanamt= sc.nextInt(); + double min=0.3*bal.peek(); + if(loanamt>min||loanamt bal = new Stack(); + Stack history = new Stack(); + @SuppressWarnings("rawtypes") + ArrayList History = new ArrayList(); + bal.add((double) Balance[a]); + int cho; + do + { + System.out.println("\n**Home Page**"); + System.out.println("1.Check balance"); + System.out.println("2.Fund Transfer"); + System.out.println("3.Transaction History"); + System.out.println("4.Loan\n5.Check Bank details"); + System.out.println("6.Switch Account"); + System.out.println("0.Exit\n"); + System.out.println("Enter your Choice"); + cho=sc.nextInt(); + switch(cho){ + case 0: + System.out.println("Thank you"); + System.exit(0); + break; + case 1: + checkBal(bal, bal.peek(), a); + break; + case 2: + System.out.println("Enter your MPIN"); + int mpin = sc.nextInt(); + if(mpin == Mpin ) { + fundTrans(history, bal.peek(), a, bal); + } + else { + System.out.print("Invalid Pin...!!!\n"); + } + break; + case 3: + transHistory(history,History,a); + break; + case 4: + Loan(bal); + break; + case 5: + BankDetails(); + break; + case 6: + changeAcc(Mpin); + break; + default: + System.out.println("Invalid input!!"); + break; + } + }while(cho!=0); + + } + +} diff --git a/Login.java b/Login.java new file mode 100644 index 0000000..2dc43f8 --- /dev/null +++ b/Login.java @@ -0,0 +1,52 @@ +//System.out.print(""); +package Project; +import java.util.*; +public class Login { + static Scanner sc = new Scanner(System.in); + @SuppressWarnings("rawtypes") + public static LinkedList ll = new LinkedList<>(); + public static void display(Stack history) + { + if(history.empty()) + return ; + Double x = history.peek(); + history.pop(); + System.out.println(x); + display(history); + history.push(x); + + } + @SuppressWarnings("unused") + public static void main(String[] args) { + System.out.println("Hello User!!!"); + System.out.print("Name: "); + String name = sc.nextLine(); + System.out.print("Set MPIN: "); + int mpin = sc.nextInt(); + System.out.println("No of account to be added: "); + int n= sc.nextInt(); + for(int i=0;i<=n-1;i++){ + Stack stk = new Stack<>(); + System.out.println("\nBank name: "); + String BankAcc = sc.next(); + stk.add(BankAcc); + System.out.print("IFSC code: "); + String ifcs = sc.next(); + stk.add(ifcs); + System.out.print("Account no: "); + String acc = sc.next(); + stk.add(acc); + System.out.print("CRN: "); + String crn = sc.next(); + stk.add(crn); + ll.add(stk); + System.out.println("Account added Succefully!!!!"); + + + } + System.out.println("\nUsing Account no 1"); + Project.Feature.main(1,mpin); + + } + +} diff --git a/README.md b/README.md index e6bc571..ea58ccc 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,27 @@ # Buffer-4.0 -Buffer is a Data Structures and Algorithms Project series, in which students can participate as mentees in teams of 3-4 people. -This year the themes on which students can create a project are- +Team Members +-Janhavi Gaikward +-Sanika Rudrawar +-Janvi Girase +-Aishwarya Pawar -1. Healthcare -2. Digital Society -3. Open Innovation -4. Custom data structure to store data +Domain: +Digital Socicety -This repository is created for all the teams to be able to upload their final project source code for the same. +Project Description- +Users: +Every person with Accounts in Bank +Functions: +-Can Check their balance of the accounts +-Transfer of Funds/Money +-Checking Transaction history +-Access to Loans +-Switching between accounts +-Check Account details +Data Structures and Algorithms Used: +-LinkedList +-Array List +-Stack -While submitting, note that: - -Each folder should have the name of the team and inside a readme file with team member details, (name, year, branch) and their theme. The readme file should also contain the link to their presentation as well as the drive link where both the report documents would be stored. - -Happy Coding :) +Link of Project Drive: +https://drive.google.com/drive/folders/1rMzBcLP3BsKULHaEz2F_-R5kxL84IgKm?usp=sharing