This repository contains solutions to all lab experiments for ISL48 – Advanced Java Laboratory. Each program demonstrates core Java concepts like interfaces, packages, GUI development, exception handling, collections, generics, JDBC, Swing, and JSP-based web applications.
📌 Question:
Write a Java Program for the following Payroll System. Create a package called
PayrollManagement. Define an interfacePayablewith a methodcalculate().
Create a superclass calledEmployeewith data members: name, age, salary, and designation. Use a parameterized constructor to initialize them.
TheEmployeeclass is inherited byFullTime,PartTime, andIntern, all implementingPayable.
- FullTime: Monthly salary
- PartTime: Hourly wages
- Intern: Fixed stipend
Create another packageCompanyand import these classes.
Store all employees in anArrayList<Employee>.
🔧 Highlights:
- Packages:
PayrollManagement,Company - Inheritance + Interface
- Polymorphism in salary calculation
- Dynamic data storage with
ArrayList
📌 Question:
Create a
Queueclass to storeStringnames and implementenqueue,dequeue, anddisplay.
Use Custom Exceptions:
QueueOverflowExceptionQueueUnderflowException
🔧 Highlights:
- Data structure: Queue
- Custom exception handling
- Queue behavior simulation using arrays or lists
📌 Question:
Define a package
stringoperationsand an interfaceStringManipulatorwith methods:
reverse(String input)toUpperCase(String input)concatenate(String str1, String str2)countVowels(String input)wordCount(String input)
Implement inStringProcessor.
Create a main class inapplicationpackage that takes input from user and tests all methods.
🔧 Highlights:
- Interface-based design
- Two-package separation
- String operations and metrics
- Modular, testable design
📌 Question:
Create a palindrome checker using
StringBuffer.
Implement exception handling:
InvalidInputException: if input has special charactersLongStringException: if string length > 5- Ignore case while checking
Show appropriate messages.
🔧 Highlights:
- Exception handling
- String reversal using
StringBuffer - Clean validations
- Case-insensitive palindrome check
📌 Question:
Create a Java app that performs password validation:
- Check for uppercase, lowercase, digit
- Count special and non-special characters
- Mask the password (show only first and last chars)
- Reverse password
- Append a security token (e.g.,
@123!)- Replace vowels with
#
🔧 Highlights:
- Regex-based checks
- Password transformations
- Encryption-style manipulation
📌 Question:
Maintain a LinkedList of contact details (name, number).
For each incoming call:
- Store time, number, and name (or "Private Caller") in an
ArrayList.- Max 5 calls: remove oldest if exceeded.
For each call:- Let user delete or view it
- Options to view contact list and missed call list
🔧 Highlights:
LinkedList+ArrayList- Max queue size: 5
- Contact lookup logic
- User-driven deletion/viewing
📌 Question:
Create a
Bookclass with: title, author, publisher, price, and a unique book ID.
Store books in aHashMap.
- Sort books by price → new List
- Search by author
- Filter books above a user-specified price
🔧 Highlights:
- Uses
HashMapandArrayList Comparable/Comparator- Multiple filters and views
- Unique ID maintenance
📌 Question:
Create a generic class
Stack<T>with:
push(),pop(),clear(),isEmpty(),display()
Backed byArrayList.
Demonstrate withStringandFloat.
🔧 Highlights:
- Java Generics
- Type-safe stack
- Demonstration with multiple types
- Internal storage:
ArrayList<T>
📌 Question:
Create a Swing app for student details: name, usn, age, address, sgpas (4 sems), and category (ComboBox).
- Validate fields with pop-up errors
ComputeCGPADone: add to collectionComplete: display collection inTextArea- Control button visibility dynamically
🔧 Highlights:
- Java Swing GUI
- Input validation
- Event-driven programming
- Form state management
📌 Question:
Build a Swing GUI app for login and item purchase:
- Validate login with dialog boxes
- Handle new/existing customers
- Enter item ID & quantity
- Show item name and cost
- Offer discount choices
🔧 Highlights:
- Dialog-based validation
- Customer and item entry
- Dynamic GUI updates
- User interaction flow
📌 Question:
Create a desktop app using Swing and JDBC:
- Create
RepresentativeandCustomertables in MySQL- Insert data via Swing forms
- Display
Representativeinfo ifCredit_Limit> 15,000
🔧 Highlights:
- JDBC integration
- SQL table operations
- Conditional query logic
- Multi-form GUI
📌 Question:
Create a JSP-based web app for shirt purchase:
- Show shirt types and cost (table)
- Dropdown for shirt type
- Radio buttons for neck type
- Input quantity
Computebutton → total cost + purchase info
🔧 Highlights:
- JSP front-end logic
- Table + dropdown + radio + textbox
- Price computation and display
- Interactive UI
👨💻 Author
Nithish Reddy
B.E. ISE – Ramaiah Institute of Technology
testing