app link: http://metrosystem01-env.eba-nw8t3nsp.ap-south-1.elasticbeanstalk.com
Use this project to learn all the technology step by step and their importance.
user have option to create account, login, swipe in, swipe out and get the fare between metro stations.
Case Study 1:
METRO SYSTEM Design and develop an application for central metro system. The application needs to provide the swipe in and swipe out functionality. Swipe in refers to boarding the station. Swipe out refers to coming out of the station. Every metro station has both swipe in and out facilities. There will be a metro card issued to every user with a minimum balance of Rs 100. The metro line consists of 5 linear stations as mentioned below.
Instructions – A. When a new user is created, accept user’s basic details along with the card balance to issue the card to the user. B. For Swipe in functionality, the application should
-
Accept the user’s input as source station.
-
The station can be from the above list only. Create a custom exception (with a meaningful message to the user) to handle invalid station inputs.
-
Validate the minimum required balance in the card. The user should have minimum balance of Rs 20 in the card. If the balance is not there, throw custom exception with appropriate message to user and do not allow to swipe in.
-
On successful swipe in, which means if the minimum balance is present then print the message as “You have successfully swiped in at the station” +
-
After deducting balance, the message needs to be printed “You have successfully swiped out with card balance as” + D. Show the output on the console. E. Handle appropriate exceptions with appropriate message whenever required. F. The design should be flexible enough so that in future, more stations and different fare calculation methods can be added. =====================================================================