Project Viva
Project Viva
1. What is the objective of your project? The main objective of the Bank Management System
project is to simulate the real-world functionalities of a bank such as account creation, deletion,
deposit, withdrawal, fund transfer, and data management. The project helps to understand core
Java programming concepts, database connectivity via JDBC, and basic CRUD operations in a
practical context.
2. What language and technologies did you use in this project? The project is developed
using the Java programming language. For database connectivity, JDBC (Java Database
Connectivity) is used to interact with an Oracle database where all account-related data is stored.
Java provides platform independence and JDBC offers robust interaction with relational
databases.
3. Why did you choose Java for this project? Java is an object-oriented, platform-independent,
and secure language that is widely used in enterprise applications. It also provides built-in
support for database access using JDBC, making it suitable for developing database-driven
applications like a banking system.
4. What is JDBC and how does it work? JDBC (Java Database Connectivity) is an API
provided by Java to connect and execute queries with databases. It uses drivers to establish
communication between the Java application and a database. JDBC works by registering a
driver, establishing a connection, executing SQL statements, and processing the results.
5. How do you establish a connection to the database in your project? We establish the
connection by loading the Oracle driver using
Class.forName("oracle.jdbc.driver.OracleDriver") and calling
DriverManager.getConnection() with appropriate JDBC URL, username, and password.
7. Explain the structure of your bank table. The bank table typically contains the following
columns: ACC_NO (account number), NAME, EMAIL, PASSWORD, BALANCE, PAN, AADHAAR, DOB,
OCCUPATION, MOBILE, GENDER, MARITAL_STATUS, INCOME, NOMINEE, BRANCH, and ACC_TYPE.
These fields capture all relevant details of a bank customer.
8. What are the main modules in your project? The main modules include:
9. How does the login system differentiate between manager and user? The system uses
command-line arguments (args[0]) to determine the role. If the input is "manager", admin
functions are activated. If it is "user", it prompts for credentials and shows customer functions.
10. How do you ensure that withdrawal does not bring the balance below ₹500? Before
executing the withdrawal, a check is added to ensure that (current balance - withdrawal
amount) >= 500. If not, the transaction is denied and the user is informed.
12. How do you handle invalid logins or account searches? By using ResultSet.next() to
verify the existence of records. If no record is found, the system shows appropriate error
messages.
13. What validations have you implemented in your program? Validations include:
14. How is your code organized across classes? Each class is modular:
15. What is the role of the Branch class? The Branch class allows the manager to view all
accounts, search for individual accounts by account number, and update fields like name and
password.
16. What are the access modifiers used in your program and why? We mostly use public
for methods that are accessed from other classes. Some utility methods can be private if used
internally within the same class. This enforces encapsulation.
17. Is your system secure? If not, what can be improved? Currently, passwords are stored as
plain text and some queries use Statement instead of PreparedStatement. Security can be
improved by using:
18. What would you add if you had more time? Features like:
Transaction history
Loan processing
Monthly interest calculation
SMS/Email alerts
Web or GUI interface
19. How would you handle multiple users or concurrency? By implementing database-level
locking or Java synchronization. In an advanced system, using a transaction manager or
connection pool would help.
20. Can this system be extended to a real bank? It is a basic prototype. A real system would
need security audits, real-time transaction support, concurrency handling, robust UI, and
regulatory compliance.
21. What is the difference between a user and a manager in your system? Managers can
create, delete, update, and view accounts. Users can only log in to view their account, deposit,
withdraw, and transfer funds.
22. How is input taken in your program? Input is taken using the Scanner class from the
console. For real applications, a graphical or web interface is preferred.
23. What SQL operations are used in your project? Main SQL operations include:
24. What is ResultSet and how is it used? ResultSet is used to hold the results returned by
SELECT queries. We use it to fetch user data, check login validity, and display records.
25. How do you handle exceptions in JDBC? We use try-catch blocks and declare throws
SQLException, ClassNotFoundException in method signatures to handle database and driver
errors.
26. What is the default password for a new account and how can it be changed? The default
password is set to pass123 and it can be updated later by the manager using the update function.
27. How is fund transfer different from deposit/withdraw? Deposit and withdraw involve one
account. Fund transfer involves two accounts and updates both sender and receiver balances.
29. What challenges did you face during development? Challenges included:
30. How do you reset or initialize the database for testing? By manually clearing or inserting
records using SQL scripts or using the account creation function repeatedly during tests.
31. What are some possible improvements for the user interface? The current UI is text-
based. Improvements could include:
32. How can you add a transaction history feature? By creating a separate transactions
table with fields like ACC_NO, TRANSACTION_TYPE, AMOUNT, DATE, etc., and logging all actions.
33. How can you improve password security? Use hashing algorithms like SHA-256 or bcrypt
to store password hashes instead of plain text.
34. What is SQL injection and how do you prevent it? SQL injection is a vulnerability where
user inputs alter SQL queries. It is prevented using PreparedStatement which treats inputs as
values, not code.
35. What are the advantages of modular programming in your project? Modular
programming improves readability, maintainability, and testability by separating concerns into
different classes.
36. How do you prevent duplicate account numbers? Before inserting a new account, the
system should run a SELECT query to ensure that the entered ACC_NO does not already exist in the
database.
37. How can you track the last login of a user? Add a last_login column in the database and
update it with the current timestamp upon successful login.
39. Can a user update their own details in your system? Currently, only the manager can
update details. The system can be enhanced to allow users to update selected fields like email or
password after login.
40. What is method overloading and is it used in your project? Method overloading allows
multiple methods with the same name but different parameters. It can be used to simplify deposit
and withdrawal functions.
41. What is polymorphism and where can you apply it in this project? Polymorphism allows
a method to perform different tasks based on context. This can be used for different types of
account transactions.
42. What data types are commonly used in your project? Common data types include int,
String, double, and Date. In SQL, we use NUMBER, VARCHAR, and DATE.
43. How do you format dates in JDBC? Dates can be formatted using TO_DATE() in SQL or
Java’s java.sql.Date class to insert into the database.
44. How can you add role-based access in the system? By adding a ROLE column in the user
table and checking the role value during login to allow/restrict functionalities.
45. What is normalization and have you used it? Normalization is organizing data to reduce
redundancy. We’ve focused on a single table; for normalization, account and personal data could
be split into separate tables.
46. Can you integrate email functionality in this project? Yes, by using JavaMail API, the
system can send confirmation or alert emails upon specific transactions.
47. What is the role of the main method in your project? The main method in
BankMain.java is the entry point. It controls login routing and invokes functions from other
classes.
48. What is a foreign key and is it used here? A foreign key is a field in one table that
references the primary key in another. Our system currently uses a single table, but it could be
used if we had multiple related tables.
49. How can you secure the connection credentials? Store them in a configuration file or use
environment variables instead of hardcoding them in the source code.
50. What IDE did you use and why? We used IntelliJ IDEA (or Eclipse/NetBeans) because it
provides code completion, debugging, version control integration, and an overall better
development experience.