Project 1
Example Output:
1. Customer

2. Seller

3. Admin

Also I have handled the exception
try {
Product[] cartProducts = current.getCart().getListOfProducts();
// System.out.println("Inside Try Block");
if(cartProducts.length > 0) {
for (int i = 0; i < cartProducts.length; i++) {
System.out.println(cartProducts[i].getProductId() + " "
+ cartProducts[i].getProductName() + " " + cartProducts[i].getCost());
}
}
else {
throw new NullPointerException();
}
}
catch(NullPointerException e) {
System.out.println("Your cart is empty!");
continue;
}
Note: If we don't handle this exception, if the user type 2 without adding the products
to the cart then it will throw NullPointerException.
