Week 2 Assignment
Week 2 Assignment
salaries?
Qus 2:- Write a jdbc program to select range of records based on address?
Qus 3:- Write a jdbc program to select range of records based on initial characters of the
employee name?
Qus 4:- A string containing only parentheses is balanced if the following is true: 1. if it is an
empty string 2. if A and B are correct, AB is correct, 3. if A is correct, (A) and {A} and [A] are
also correct.
Examples of some correctly balanced strings are: "{}()", "[{()}]", "({()})"
Examples of some unbalanced strings are: "{}(", "({)}", "[[", "}{" etc.
Given a string, determine if it is balanced or not.
Input Format
There will be multiple lines in the input file, each having a single non-empty string. You
should read input till end-of-file.
The part of the code that handles input operation is already provided in the editor.
Output Format
For each case, print 'true' if the string is balanced, 'false' otherwise.
Sample Input
{}()
({()})
{}(
[]
Sample Output
true
true
false
true
Qus 5:-
Write a jdbc Application for Expense Tracker
• Description: Build a system to track personal expenses and budgets.
• Features:
o Add, edit, and delete expense records.
o Generate reports by category or date range.
• Database Tables:
o Expenses (expense_id, user_id, amount, category, date)
o Users (user_id, name, email, password)
Qus 6:-
Write a JDBC application for Banking System
• Features:
o Create and manage user accounts.
o Deposit and withdraw money.
o View transaction history.
• Database Tables:
o Accounts (account_id, user_name, balance)
o Transactions (transaction_id, account_id, type, amount, transaction_date)
Qus 7:-
Write a JDBC application for Employee Management System
• Description: Manage employee records in an organization.
• Features:
o Add, edit, view, and delete employee details.
o Assign employees to departments.
• Database Tables:
o Employees (employee_id, name, email, department_id, salary)
o Departments (department_id, department_name)
Qus 8:-
Write a JDBC application for Library Management System
• Description: Build a system where users can manage books, borrowers, and
lending/returning books.
• Features:
o Add, update, and delete books.
o Register and manage borrowers.
o Record book lending and return dates.
• Database Tables:
o Books (book_id, title, author, publisher, quantity)
o Borrowers (borrower_id, name, email, phone)
o Lending (lending_id, book_id, borrower_id, issue_date, return_date)