0% found this document useful (0 votes)
14 views6 pages

Project Viva

The document outlines a Java Bank Management System project, detailing its objectives, technologies used (Java and JDBC), and core functionalities like account management and fund transfers. It addresses various aspects such as security measures, user roles, database interactions, and potential improvements for the system. Additionally, it covers challenges faced during development and testing methodologies employed to ensure the system's reliability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views6 pages

Project Viva

The document outlines a Java Bank Management System project, detailing its objectives, technologies used (Java and JDBC), and core functionalities like account management and fund transfers. It addresses various aspects such as security measures, user roles, database interactions, and potential improvements for the system. Additionally, it covers challenges faced during development and testing methodologies employed to ensure the system's reliability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Viva Questions and Answers for Java Bank Management System Project

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.

6. What is a PreparedStatement and why is it better than Statement? PreparedStatement


is a JDBC class used to execute parameterized queries. It is more secure and efficient than
Statement because it precompiles the SQL query and prevents SQL injection by treating user
inputs as parameters.

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:

 BankMain: Main controller class


 BankOperations: Admin functionalities like open, close, update, view
 UserOperations: User functionalities like deposit, withdraw, transfer
 CustomerAccount: Account creation module
 DeleteAccount: Account deletion
 Branch: Viewing and updating accounts

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.

11. What happens during a fund transfer operation? In a fund transfer:

 The system checks if the sender has sufficient balance.


 The sender’s balance is reduced, and the recipient’s balance is
increased.
 Both updates are committed to the database.

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:

 Minimum balance requirement for withdrawals and transfers


 Confirmation before deletion
 Account existence checks
 Secure login verification

14. How is your code organized across classes? Each class is modular:

 One class for login and control flow


 Separate classes for account creation, deletion, and updates
 A clear separation of manager and user responsibilities

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:

 Password hashing (e.g., using SHA-256)


 Full use of PreparedStatement
 Role-based access control

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:

 SELECT for fetching data


 INSERT for creating new records
 UPDATE for updating balances or info
 DELETE for removing records

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.

28. How do you test your program? By running various scenarios:

 Valid and invalid logins


 Deposits and withdrawals
 Transfers with insufficient balance
 Account creation and deletion

29. What challenges did you face during development? Challenges included:

 Handling SQL exceptions


 Validating user inputs
 Debugging JDBC connectivity
 Designing a modular class structure

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:

 Java Swing/JavaFX GUI


 Web interface using JSP/Servlets or Spring Boot

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.

38. How is exception handling different in compile-time vs run-time errors? Compile-time


errors are caught by the compiler and must be fixed before execution. Run-time errors occur
during execution and are handled using try-catch blocks.

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.

You might also like