|
| 1 | +import java.util.Scanner; |
| 2 | + |
| 3 | +/* |
| 4 | +* E-Commerce Applications |
| 5 | + 1 -> Admin |
| 6 | + 2 -> Client |
| 7 | + 3 -> Create New User |
| 8 | +
|
| 9 | + * Entire Client List -> List |
| 10 | + * Entire Purchase List -> List |
| 11 | + * Entire Product List -> Map |
| 12 | + * Entire Customer Purchase List -> Map |
| 13 | +
|
| 14 | + * Admin |
| 15 | + -> Add Product |
| 16 | + -> Can view/Add/Delete/Update Customers List |
| 17 | + -> Can view/Add/Delete/Update Products List |
| 18 | + -> Can view/Add/Delete/Update Coupon Codes |
| 19 | + -> Can view All Sales |
| 20 | + * Product Registration |
| 21 | + -> Product Id |
| 22 | + -> Product Name |
| 23 | + -> Product Stock |
| 24 | +
|
| 25 | + * Client |
| 26 | + -> Can View/AddToCart/Buy a Product |
| 27 | + -> Can View Invoice |
| 28 | + -> Delete Product while checkout |
| 29 | +
|
| 30 | + * New Client Registration |
| 31 | + -> Client Name |
| 32 | + -> Client User ID |
| 33 | + -> Admin Password To Verifications |
| 34 | +
|
| 35 | +* |
| 36 | +*/ |
1 | 37 | public class Main { |
2 | 38 | public static void main(String[] args) { |
3 | | - System.out.println("Hello world!"); |
| 39 | + System.out.println("=================================" + |
| 40 | + "\n======E-Commerce Application=====" + |
| 41 | + "\n================================="); |
| 42 | + Scanner input =new Scanner(System.in); |
| 43 | + boolean isUserWantedToContinue = true; |
| 44 | + while (isUserWantedToContinue){ |
| 45 | + System.out.println("1 -> Admin LogIn\n2 -> Customer LogIn\n3 -> Create New User\n4 -> Exit\nEnter Choice:"); |
| 46 | + int userChoice = input.nextInt(); |
| 47 | + switch (userChoice){ |
| 48 | + case 1: |
| 49 | + System.out.println("Enter AdminId and Password"); |
| 50 | + String AdminId = input.nextLine(); |
| 51 | + String Password = input.nextLine(); |
| 52 | + AdminControlPanel.AdminControls(AdminId,Password); |
| 53 | + break; |
| 54 | + case 2: |
| 55 | + System.out.println("Enter Customer Id:"); |
| 56 | + int CustomerId = input.nextInt(); |
| 57 | + ProductListPage.CustomerControls(); |
| 58 | + break; |
| 59 | + case 3: |
| 60 | + System.out.println("Enter Customer Name and Customer Contact"); |
| 61 | + String CustomerName = input.next(); |
| 62 | + String CustomerContact = input.next(); |
| 63 | + Customer.CreateNewCustomer(CustomerName, CustomerContact); |
| 64 | + |
| 65 | + break; |
| 66 | + case 4: |
| 67 | + isUserWantedToContinue = false; |
| 68 | + break; |
| 69 | + }; |
| 70 | + } |
4 | 71 | } |
5 | 72 | } |
0 commit comments