From 704bd17789a80b7afa2024ab51db920aa3a95c31 Mon Sep 17 00:00:00 2001 From: NikitaP120703 <120330391+NikitaP120703@users.noreply.github.com> Date: Sun, 30 Apr 2023 22:09:13 +0530 Subject: [PATCH 1/6] Main file There are 6 files in the main file for this project. --- Accounts.java | 15 ++++++ Admin.java | 22 +++++++++ Campaign.java | 120 +++++++++++++++++++++++++++++++++++++++++++++++ Main.java | 22 +++++++++ Transaction.java | 35 ++++++++++++++ User.java | 69 +++++++++++++++++++++++++++ 6 files changed, 283 insertions(+) create mode 100644 Accounts.java create mode 100644 Admin.java create mode 100644 Campaign.java create mode 100644 Main.java create mode 100644 Transaction.java create mode 100644 User.java diff --git a/Accounts.java b/Accounts.java new file mode 100644 index 0000000..06a5333 --- /dev/null +++ b/Accounts.java @@ -0,0 +1,15 @@ +import java.util.Scanner; + +public class Accounts { + Scanner sc=new Scanner(System.in); + Accounts next=null; + String name,Id; + long PhNo; + + Accounts(String name1,String Id1,long ph_no1){ + name=name1; + Id=Id1; + PhNo=ph_no1; + } + +} \ No newline at end of file diff --git a/Admin.java b/Admin.java new file mode 100644 index 0000000..c056e84 --- /dev/null +++ b/Admin.java @@ -0,0 +1,22 @@ +import java.util.*; +public class Admin { + public static void main(String Args[]) + { + Scanner sc = new Scanner(System.in); + System.out.println("Hello Admin,"); + System.out.print("Enter your password :"); + String pswd=sc.next(); + + if(!pswd.equals("admin123")) + { + System.out.println("INCORRECT PASSWORD"); + main(null); + } + else { + System.out.println("Admin login successful\n"); + } + Campaign Campaign_obj=new Campaign(); + Campaign_obj.main(null); + + } +} \ No newline at end of file diff --git a/Campaign.java b/Campaign.java new file mode 100644 index 0000000..b81c3e0 --- /dev/null +++ b/Campaign.java @@ -0,0 +1,120 @@ +import java.util.*; +public class Campaign { + String name,description; + double max_amount,donated_amount=0; + static int counter=0; + static Campaign campaigns[]=new Campaign[10]; + static Main main_obj=new Main(); + static Scanner sc = new Scanner(System.in); + static Transaction obj1=new Transaction(); + void view() + { + if(counter==0) + { + System.out.println("No Campaigns "); + return; + } + System.out.println("**********CAMPAIGNS********** \n"); + for(int i=0;icampaigns[i].max_amount)) { + System.out.println("Sorry,maximum limit of fund exceeded!!"); + } + else { + campaigns[i].donated_amount+=amt; + System.out.println("Thankyou for donating !!"); + } + } + } + obj1.main(null); + } + public static void main(String Args[]) { + // TODO Auto-generated method stub + Campaign obj=new Campaign(); + System.out.println("1.View Campaigns"); + System.out.println("2.Create Campaigns"); + System.out.println("3.Edit Campaigns"); + System.out.println("4.Exit"); + System.out.println("\n"); + int choice=sc.nextInt(); + if(choice==1) + obj.view(); + if(choice==2) + obj.create(); + if(choice==3) + obj.edit(); + if(choice!=4) + Campaign.main(null); + if(choice==4) { + main_obj.main(null); + } + + } + + +} \ No newline at end of file diff --git a/Main.java b/Main.java new file mode 100644 index 0000000..398b367 --- /dev/null +++ b/Main.java @@ -0,0 +1,22 @@ +import java.util.*; +public class Main { + public static void main(String Args[]) + { + Scanner sc = new Scanner(System.in); + System.out.println("WELCOME"); + System.out.println("Enter your choice:"); + System.out.println("1.Admin\n2.User\n3.Exit"); + int a=sc.nextInt(); + if(a==1) { + Admin Admin_obj = new Admin(); + Admin_obj.main(Args); + } + if(a==2) { + User user_obj=new User(); + user_obj.main(Args); + } + if(a==3) { + System.exit(0); + } + } +} diff --git a/Transaction.java b/Transaction.java new file mode 100644 index 0000000..c168cfb --- /dev/null +++ b/Transaction.java @@ -0,0 +1,35 @@ +import java.util.*; +public class Transaction { + String choice,description; + double max_amount,donated_amount=0; + static int counter=0; + static double amount=0; + static Campaign transactions[]=new Campaign[10]; + static Scanner sc = new Scanner(System.in); + static String usercampaign=null; + static Main obj=new Main(); + + public static void main(String[] args) { + System.out.println("Do you want donate to a campaign ?"); + System.out.println("1.Yes\n2.No"); + int ans=sc.nextInt(); + if(ans==1) { + System.out.println("Available Campaigns: "); + Campaign obj=new Campaign(); + obj.view(); + System.out.println("Enter campaign name you wish to donate to:"); + usercampaign=sc.next(); + System.out.println("Enter the amount to be donated:"); + amount=sc.nextInt(); + obj.add_amount(usercampaign,amount); + obj.main(null); + } + if(ans==2) { + obj.main(null); + } + if(ans!=1 && ans!=2) { + System.out.println("Enter the valid input"); + Transaction.main(args); + } + } +} diff --git a/User.java b/User.java new file mode 100644 index 0000000..7f7d542 --- /dev/null +++ b/User.java @@ -0,0 +1,69 @@ +import java.util.Scanner; +public class User { + static Accounts head=null,temp=null; + static String name=null; + static long PhNo=0; + static int UID=100; + static String Id=null; + static String testId=null; + static Transaction obj=new Transaction(); + public static void main(String[] args) { + Scanner sc=new Scanner(System.in); + System.out.println("Enter your choice :"); + System.out.println("1.New User\n2.Existing User\n3.Exit"); + int choice=sc.nextInt(); + if(choice==1) { + System.out.println("Enter your name:"); + name=sc.next(); + System.out.println("Enter your phone number: "); + PhNo=sc.nextLong(); + Id="UID"+String.valueOf(UID); + UID++; + System.out.println("Your Id is:"+Id); + Accounts new_donar=new Accounts(name,Id,PhNo); + if(head==null) { + head=new_donar; + temp=head; + } + else { + temp=head; + while(temp.next!=null) { + temp=temp.next; + } + temp.next=new_donar; + } + obj.main(null); + } + int flag=0; + if(choice==2) { + + System.out.println("Enter your ID: "); + testId=sc.next(); + temp=head; + while(temp!=null) { + if(testId.equals(temp.Id)) { + System.out.println("Welcome "+temp.name); + obj.main(null); + flag=1; + break; + + } + temp=temp.next; + } + if(flag==0) + { + System.out.println("Invalid"); + main(null); + } + + obj.main(null); + + } + if(choice==3) { + + } + + + User.main(null); + } +} \ No newline at end of file From 8fff98ab5737404e6faf0f8f209262b9e488971b Mon Sep 17 00:00:00 2001 From: NikitaP120703 <120330391+NikitaP120703@users.noreply.github.com> Date: Sun, 30 Apr 2023 22:37:29 +0530 Subject: [PATCH 2/6] Feedback forms --- Feedback forms | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Feedback forms diff --git a/Feedback forms b/Feedback forms new file mode 100644 index 0000000..6639919 --- /dev/null +++ b/Feedback forms @@ -0,0 +1,3 @@ +Links for feedback forms: +1.https://docs.google.com/document/d/1_csU_-GJwnswKzC8Yj-L58lI9TX1gtVdCjZDKQFoSYQ/edit +2.https://docs.google.com/document/d/1HunY1MGvfiCCNO3n5WgKH7qrN8ubxQeOyAewuAze3Pw/edit From 62a9b26ac04d43a2b83b6d67d44b93ee2ed8ce7f Mon Sep 17 00:00:00 2001 From: NikitaP120703 <120330391+NikitaP120703@users.noreply.github.com> Date: Sun, 30 Apr 2023 22:56:19 +0530 Subject: [PATCH 3/6] Readme.md Report --- Readme.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..8259fc7 --- /dev/null +++ b/Readme.md @@ -0,0 +1,41 @@ +ALPHA CLANS: MISSION TO SERVE HUMANITY! + +TEAM MEMBERS (SY): + - NIKITA PAWAR + - SAKSHI WAGH + - AARYA AMBEKAR + - PURVA SARDA + +PROBLEM STATEMENT: +Building a console-based programme to make donations anywhere anytime in a click. + +FEATURES: +This is a console-based programme which simulates Disaster Campaign Funding. +It enables the admin to securely login into the admin’s window to add and edit campaign details. +It allows users to create their accounts on the platform to make donations to various campaigns. +Users can choose how much to donate and which campaign to donate to. +Appropriate output is generated according to the user’s and admin's input. + +DATA STRUCTURES USED: +1. SINGLY LINKED LIST: + List of all users + List of donations they make. + List of user's details. +Size of these lists is dynamic, hence singly linked list is used for efficient insertion and deletion. + +2. ARRAY OF OBJECTS : + To store the requirements of the each campaign. +Array of object allows us to deal with number of attributes connected with a single entity. + +3. ARRAY: + Used to implement array of objects. + +LEARNINGS AND OUTCOMES: +Importance and application of Abstract Data Types (ADTs) and Flowcharts +Application and implementation of various linear data structures +Importance of static keyword (used a static variable to keep track object we are refering to) +Learned a powerful tool - GitHub + +WHAT'S NEXT: +User interface for better user experience. +Database for storing user history and donation data. From b0255af7a02a682aeac535b2275f8e8cf26aeb22 Mon Sep 17 00:00:00 2001 From: NikitaP120703 <120330391+NikitaP120703@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:18:10 +0530 Subject: [PATCH 4/6] Video link --- Video link | 1 + 1 file changed, 1 insertion(+) create mode 100644 Video link diff --git a/Video link b/Video link new file mode 100644 index 0000000..7044307 --- /dev/null +++ b/Video link @@ -0,0 +1 @@ +https://drive.google.com/drive/folders/1_xUU_ByuWprx3L3OTfpFxlDCTrvTmuBj From 6b28070b3ad5241c9a989f0067a46c3e73ca52d5 Mon Sep 17 00:00:00 2001 From: NikitaP120703 <120330391+NikitaP120703@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:24:20 +0530 Subject: [PATCH 5/6] README.md --- README.md | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index e6bc571..8259fc7 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,41 @@ -# 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- +ALPHA CLANS: MISSION TO SERVE HUMANITY! -1. Healthcare -2. Digital Society -3. Open Innovation -4. Custom data structure to store data +TEAM MEMBERS (SY): + - NIKITA PAWAR + - SAKSHI WAGH + - AARYA AMBEKAR + - PURVA SARDA -This repository is created for all the teams to be able to upload their final project source code for the same. +PROBLEM STATEMENT: +Building a console-based programme to make donations anywhere anytime in a click. -While submitting, note that: +FEATURES: +This is a console-based programme which simulates Disaster Campaign Funding. +It enables the admin to securely login into the admin’s window to add and edit campaign details. +It allows users to create their accounts on the platform to make donations to various campaigns. +Users can choose how much to donate and which campaign to donate to. +Appropriate output is generated according to the user’s and admin's input. -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. +DATA STRUCTURES USED: +1. SINGLY LINKED LIST: + List of all users + List of donations they make. + List of user's details. +Size of these lists is dynamic, hence singly linked list is used for efficient insertion and deletion. -Happy Coding :) +2. ARRAY OF OBJECTS : + To store the requirements of the each campaign. +Array of object allows us to deal with number of attributes connected with a single entity. + +3. ARRAY: + Used to implement array of objects. + +LEARNINGS AND OUTCOMES: +Importance and application of Abstract Data Types (ADTs) and Flowcharts +Application and implementation of various linear data structures +Importance of static keyword (used a static variable to keep track object we are refering to) +Learned a powerful tool - GitHub + +WHAT'S NEXT: +User interface for better user experience. +Database for storing user history and donation data. From cf11936882c01bedd6421b86f8fbfc57cf86b922 Mon Sep 17 00:00:00 2001 From: NikitaP120703 <120330391+NikitaP120703@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:24:49 +0530 Subject: [PATCH 6/6] Delete Readme.md --- Readme.md | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 Readme.md diff --git a/Readme.md b/Readme.md deleted file mode 100644 index 8259fc7..0000000 --- a/Readme.md +++ /dev/null @@ -1,41 +0,0 @@ -ALPHA CLANS: MISSION TO SERVE HUMANITY! - -TEAM MEMBERS (SY): - - NIKITA PAWAR - - SAKSHI WAGH - - AARYA AMBEKAR - - PURVA SARDA - -PROBLEM STATEMENT: -Building a console-based programme to make donations anywhere anytime in a click. - -FEATURES: -This is a console-based programme which simulates Disaster Campaign Funding. -It enables the admin to securely login into the admin’s window to add and edit campaign details. -It allows users to create their accounts on the platform to make donations to various campaigns. -Users can choose how much to donate and which campaign to donate to. -Appropriate output is generated according to the user’s and admin's input. - -DATA STRUCTURES USED: -1. SINGLY LINKED LIST: - List of all users - List of donations they make. - List of user's details. -Size of these lists is dynamic, hence singly linked list is used for efficient insertion and deletion. - -2. ARRAY OF OBJECTS : - To store the requirements of the each campaign. -Array of object allows us to deal with number of attributes connected with a single entity. - -3. ARRAY: - Used to implement array of objects. - -LEARNINGS AND OUTCOMES: -Importance and application of Abstract Data Types (ADTs) and Flowcharts -Application and implementation of various linear data structures -Importance of static keyword (used a static variable to keep track object we are refering to) -Learned a powerful tool - GitHub - -WHAT'S NEXT: -User interface for better user experience. -Database for storing user history and donation data.