0% found this document useful (0 votes)
310 views22 pages

Java Manual

1. This document provides Java programs to implement various object oriented concepts: - Program 1 demonstrates class inheritance, polymorphism and constructors to model bank accounts with common customer details but different account types like savings and loan accounts. 2. Program 2 defines an abstract Vehicle class with fuel status and top speed attributes. Concrete Car and Bike classes inherit from this abstract class and override the topSpeed method. 3. Program 3 defines a TourPlan interface with abstract travel planning methods. A TravelAgent class implements this interface and overrides the abstract methods to provide travel details and calculate total fare. 4. Program 4 provides account functionality for an Axis Bank savings account, including deposit and withdraw transactions. It demonstrates exception handling

Uploaded by

NikhilGupta
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
0% found this document useful (0 votes)
310 views22 pages

Java Manual

1. This document provides Java programs to implement various object oriented concepts: - Program 1 demonstrates class inheritance, polymorphism and constructors to model bank accounts with common customer details but different account types like savings and loan accounts. 2. Program 2 defines an abstract Vehicle class with fuel status and top speed attributes. Concrete Car and Bike classes inherit from this abstract class and override the topSpeed method. 3. Program 3 defines a TourPlan interface with abstract travel planning methods. A TravelAgent class implements this interface and overrides the abstract methods to provide travel details and calculate total fare. 4. Program 4 provides account functionality for an Axis Bank savings account, including deposit and withdraw transactions. It demonstrates exception handling

Uploaded by

NikhilGupta
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 22

Nitte Meenakshi Institute of Technology

(AN AUTONOMOUS INSTITUTION, AFFILIATED TO VISVESVARAYA TECHNOLOGICAL


UNIVERSITY, BELGAUM) , (A Unit of Nitte Education Trust, Mangalore)
PB No. 6429, Yelahanka, Bangalore 560-064, Karnataka
Telephone: 080- 22167860, Fax: 080 – 22167805

Department of Computer Science and Engineering


Date: 14-01-2017

JAVA LABORATORY - PROGRAMS


Code: 14CSL68
1. Assume that a bank offers different types of user accounts like saving and loan account for
its customers. For all customers basic details are common like name, address, phone, PAN
and Aadhar no., but the way this accounts operates is different. Some account pays
interest like SB A/C, some collect interest for the credit given. Demonstrate how above
mentioned requirements can be developed in Java program. (hint: USE CLASS
INHERITANCE, POLYMORPHISM, CONSTRUCTORS)
a. Identify various classes to implement this scenario
b. Specify how to store common details of the customers and separate different
functionality of the accounts.
c. Display the details of the customer with the type of account and its details.
d. Calculate ROI for SB Account or Loan Interest for at least 2 users.

package lab_programs;
class Bank{
String name;
String address;
String phone;
String pan;
String aadhar;
public Bank() {
}
public Bank(String name, String address, String phone, String pan, String aadhar) {
this.name = name;
this.address = address;
this.phone = phone;
this.pan = pan;
this.aadhar = aadhar;
}

void calcInt(){}
void displayDetails(){
System.out.println("Name : "+name+" "+"Address : "+address+" "+"Phone No : "+phone+"
"+"PAN : "+pan+" "+"Aadhar : "+aadhar);
}
}
class SBAccount extends Bank{
String accNum;
double accBal;
double interest;
public SBAccount(String name, String address, String phone, String pan, String aadhar,String
num) {
super(name, address, phone, pan, aadhar);
accNum=num;
accBal=1000;
}
public SBAccount(String name, String address, String phone, String pan, String aadhar,String
num,double bal) {
super(name, address, phone, pan, aadhar);
accNum=num;
accBal=bal;
}

void calcInt(){
interest=accBal*0.04;
}
void displayDetails(){
super.displayDetails();
System.out.println("Account Type : S/B Account\n"+"Account No : "+accNum+"\n"+"Interest
paid per year : "+interest+"\nfor Amount : "+accBal);
}
}

class LoanAccount extends Bank{


String accNum;
double loanAmt;
double interest;
public LoanAccount(String name, String address, String phone, String pan, String
aadhar,String num,double loan) {
super(name, address, phone, pan, aadhar);
accNum=num;
loanAmt=loan;
}
void calcInt(){
interest=loanAmt*0.10;
}
void displayDetails(){
super.displayDetails();
System.out.println("Account Type : Loan Account\n"+"Account No :
"+accNum+"\n"+"Interest demand for 1st year : "+interest+"\nfor Amount : "+loanAmt);
}
}
public class prg1 {
public static void main(String[] args) {
Bank bankAcc=new Bank();
bankAcc=new SBAccount("Mohan", "Bangalore", "123456", "ASTPM1000", "33334444", "111");
bankAcc.calcInt();
bankAcc.displayDetails();
System.out.println("\n");
bankAcc=new LoanAccount("Kiran", "Mysore", "654321", "BSTPM1000", "55556666", "222",20000);
bankAcc.calcInt();
bankAcc.displayDetails();
}
}

Expected Output

Name : Mohan Address : Bangalore Phone No : 123456 PAN : ASTPM1000 Aadhar : 33334444
Account Type : S/B Account
Account No : 111
Interest paid per year : 40.0
for Amount : 1000.0

Name : Kiran Address : Mysore Phone No : 654321 PAN : BSTPM1000 Aadhar : 55556666
Account Type : Loan Account
Account No : 222
Interest demand for 1st year : 2000.0
for Amount : 20000.0
2. Consider a scenario of myself owning a car and a bike, which need fuel to run. The
maximum speed at which my car can run is 150 Km/Hr and bike is 100 Km/Hr. write a java
program to define an abstract class which contain methods for printing the status of fuel
(EMPTY, HALF or FULL) in the vehicle and top speed of it. Vehicles fuel status and top
speed is initialized at the time of object creation. (hint: use CONSTRUCTOR, SUPER,
ABSTRACT CLASS)
a. Identify the abstract class and normal class to implement above scenario.
b. Check weather constructors can be used in the abstract class.
c. Identify abstract and non-abstract methods in a abstract class.
d. Demonstrate how to pass values from derived class constructor to base class
constructor.
e. Display the attributes of the car and a bike using abstract method.

package lab_programs;
abstract class Vehicle{
String fuel;

public Vehicle(String fuel) {


this.fuel = fuel;
}
public void fuelStatus(String vehicle){
System.out.println("This "+vehicle+"\'s fuel tank is "+fuel);
}
abstract void topSpeed();
}
class Car extends Vehicle{
int speed;
public Car(String fuel,int carSpeed) {
super(fuel);
speed=carSpeed;
}

@Override
void topSpeed() {
System.out.println("Car runs at "+speed+" Km/Hr top speed");
}
}
class Bike extends Vehicle{
int speed;
public Bike(String fuel,int bikeSpeed) {
super(fuel);
speed=bikeSpeed;
}
@Override
void topSpeed() {
System.out.println("Bike runs at "+speed+" Km/Hr top speed");
}
}

public class prg2 {


public static void main(String[] args) {
Car car=new Car("FULL",150);
car.fuelStatus("CAR");
car.topSpeed();
System.out.println("\n");
Bike bike=new Bike("HALF",100);
bike.fuelStatus("BIKE");
bike.topSpeed();
}
}

Expected Output

This CAR's fuel tank is FULL


Car runs at 150 Km/Hr top speed

This BIKE's fuel tank is HALF


Bike runs at 100 Km/Hr top speed
3. Consider a scenario in which I like to go on a business tour from Chennai to Delhi for
attending some board meeting at Indore on the way. The business tour is finalized by my
Secretary and put into an interface. The interface tells from where to where to go but not
how to go – by plane, by bus or by train. The interface "TourPlan" is given with dates to
a travel agent to book tickets. Now the travel agent writes a Java class implementing the
interface and overriding all methods of interface. He knows very well, if any abstract
method is not overridden, I cannot go to Delhi. It is a must to override or implement with
the mode of travel. (hint: use INTERFACE)
a. Identify abstract methods in the interface.
b. Calculate the travel expenses for a trip.

package lab_programs;
interface TourPlan
{
public abstract void chennaiToHyd(String mode,double fare);
public abstract void hydToIndore(String mode,double fare);
public abstract void indoreToDelhi(String mode,double fare);
}

class TravelAgent implements TourPlan


{
double totalFare=0;
public void chennaiToHyd(String mode,double fare)
{
System.out.println("Travel Chennai to Hyderabad by "+mode+"Travel Fare is "+fare);
totalFare+=fare;
}
public void hydToIndore(String mode,double fare)
{
System.out.println("Travel Hyderabad to Indore by "+mode+"Travel Fare is "+fare);
totalFare+=fare;
}
public void indoreToDelhi(String mode,double fare)
{
System.out.println("Travel Indore to Delhi by "+mode+"Travel Fare is "+fare);
totalFare+=fare;
}

void totalTravelExpenditure(){
System.out.println("Total Travell Expenditure to reach from chennai to Delhi is "+totalFare);
}
}

public class prg3 {


public static void main(String args[])
{
TravelAgent ta = new TravelAgent();
ta.chennaiToHyd("Plane",10000);
ta.hydToIndore("Plane",7000);
ta.indoreToDelhi("Plane",6000);
ta.totalTravelExpenditure();
}
}

Expected Output

Travel Chennai to Hyderabad by PlaneTravel Fare is 10000.0


Travel Hyderabad to Indore by PlaneTravel Fare is 7000.0
Travel Indore to Delhi by PlaneTravel Fare is 6000.0
Total Travell Expenditure to reach from chennai to Delhi is 23000.0
4. Suppose a customer open a S/B Account in an Axis Bank. According to Bank policy he has
to maintain initial/minimum bank balance of Rs. 1000. (hint: use EXCEPTION HANDLING)
a. Provide functionality to display customer info., deposit and withdraw transaction
from the account.
b. if a customer withdraws more amount which makes the balance less than 1000,
then an user defined exception called LessBalanceException has to be thrown.
c. Restrict customer from withdrawing more than Rs. 4500/- per transaction, if he
tries TransactionNotAllowed exception has to be thrown.
d. Demonstrate the use checked and unchecked exceptions in java.
Note: NumberFormatException is a unchecked exception and user defined exception like
LessBalanceException and TransactionNotAllowed are checked exceptions

package lab_programs;
import java.util.Scanner;

class LessBalanceException extends Exception{


String s1;
LessBalanceException(String s2) {
s1 = s2;
}
@Override
public String toString() {
return ("LessBalanceException = "+s1);
}
}
class TransactionNotAllowed extends Exception{
String s1;
TransactionNotAllowed(String s2) {
s1 = s2;
}
@Override
public String toString() {
return ("TransactionNotAllowed = "+s1);
}
}
class AxisBank{
String name;
String address;
String phone;
String pan;
String aadhar;
double balance;
public AxisBank(String name, String address, String phone, String pan, String aadhar,double balance)
{
this.name = name;
this.address = address;
this.phone = phone;
this.pan = pan;
this.aadhar = aadhar;
this.balance=balance;
}
void depositAmount(double amt){
balance +=amt;
}
void withdrawAmount(double amt){
try{
if(amt>4500)
throw new TransactionNotAllowed("Exceeds per day limit (day limit is
4500)");
if((balance-amt)<1000){
throw new LessBalanceException("can\'t with this much amount due to
insufficient balance, minimum 1000 has to be maintained");
}else{
balance-=amt;
}
}catch(LessBalanceException e){
System.out.println(e);
}
catch(TransactionNotAllowed e){
System.out.println(e);
}
}
public void display() {
System.out.println("Name : "+name+" "+"Address : "+address+" "+"Phone No : "+phone+" "+"PAN :
"+pan+" "+"Aadhar : "+aadhar);
System.out.println("Available Balanc in the account is "+balance);
}

}
public class prg4 {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
int choice=0;double amt=0;
AxisBank ab=new AxisBank("Mohan", "Bangalore", "123456", "ASTPM1000", "111222",
1000);
ab.display();
do{
System.out.println("1 : Deposit\n2 : Withdraw\n3 : Exit");
choice=scan.nextInt();
switch(choice){
case 1:System.out.println("Enter amount to be deposited : ");
amt=scan.nextDouble();
ab.depositAmount(amt);
ab.display();
break;
case 2:
System.out.println("Enter amount to withdraw : ");
amt=scan.nextDouble();
ab.withdrawAmount(amt);
ab.display();
break;
default:System.out.println("Enter Valid Option");
}
}while(choice!=3);
scan.close();
}
}

Expected Output

Name : Mohan Address : Bangalore Phone No : 123456 PAN : ASTPM1000 Aadhar : 111222
Available Balanc in the account is 1000.0
1 : Deposit
2 : Withdraw
3 : Exit
2
Enter amount to withdraw :
67
LessBalanceException = can't with this much amount due to insufficient balance, minimum 1000 has to be
maintained
Name : Mohan Address : Bangalore Phone No : 123456 PAN : ASTPM1000 Aadhar : 111222
Available Balanc in the account is 1000.0
1 : Deposit
2 : Withdraw
3 : Exit
1
Enter amount to be deposited :
6000
Name : Mohan Address : Bangalore Phone No : 123456 PAN : ASTPM1000 Aadhar : 111222
Available Balanc in the account is 7000.0
1 : Deposit
2 : Withdraw
3 : Exit
2
Enter amount to withdraw :
4501
TransactionNotAllowed = Exceeds per day limit (day limit is 4500)
Name : Mohan Address : Bangalore Phone No : 123456 PAN : ASTPM1000 Aadhar : 111222
Available Balanc in the account is 7000.0
5. Searching and sorting are the often used parts in any program. Create two Java packages
for searching and sorting. (hint: use PACKAGE & MULTI-THREAD)
a. Implement some basic searching and sorting methods in the packages.
b. Search for a particular student in a student list of CSE department. sort the
elements before performing the binary search. Use methods defined in the
packages. (Use sequential threads)
c. Sort same student list concurrently using different sorting methods available in the
packages. (use Concurrent threads)

package algorithms.search;

public class BinarySearch {


public void binarySearch(int array[],int n, int key)
{
int first, last, middle, search;

search = key;

first = 0;
last = n - 1;
middle = (first + last)/2;

while( first <= last )


{
if ( array[middle] < search )
first = middle + 1;
else if ( array[middle] == search )
{
System.out.println(search + " found at location " + (middle + 1) + ".");
break;
}
else
last = middle - 1;

middle = (first + last)/2;


}
if ( first > last )
System.out.println(search + " is not present in the list.\n");
}
}

package algorithms.sort;

public class BubbleSort {


public int [] bubbleSort(int arr[],int n){
int temp = 0; int i=0;
for(; i < n; i++){
for(int j=1; j < (n-i); j++){
if(arr[j-1] > arr[j]){
//swap elements
temp = arr[j-1];
arr[j-1] = arr[j];
arr[j] = temp;
}

}
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("Sorting using Bubble Sort");
}
return arr;
}
}

package algorithms.sort;
public class SelectionSort {
public int [] selectionSort(int arr[],int n){
int i = 0;
for (; i < n - 1; i++)
{
int index = i;
for (int j = i + 1; j < n; j++){
if (arr[j] < arr[index]){
index = j;//searching for lowest index
}
}
int smallerNumber = arr[index];
arr[index] = arr[i];
arr[i] = smallerNumber;
System.out.println("Sorting using Selection Sort");
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println("Sorting using Selection Sort");
return arr;
}
}

package lab_programs;
import algorithms.search.*;
import algorithms.sort.*;

class Sort extends Thread{


String str;
Sort(int i){
if(i==1)
str="Bub";
else
str="Sel";
}
public void run(){
int arr[]={5,3,1,6,4};
int arr1[]={25,23,21,26,24};

int array[];
int n=5;
if(str.equals("Bub"))
{
BubbleSort bubsort=new BubbleSort();
array=bubsort.bubbleSort(arr1, n);
//for(int i=0;i<array.length;i++)
//System.out.println(array[i]);
}
else
{
SelectionSort selsort=new SelectionSort();
array=selsort.selectionSort(arr,n);
//for(int i=0;i<array.length;i++)
//System.out.println(array[i]);
}
}
}

class Search extends Thread{


public void run(){
int arr[]={15,13,11,16,14};
int array[];
int n=5,key=13;
BubbleSort bubsort=new BubbleSort();
array=bubsort.bubbleSort(arr, n);
BinarySearch bs=new BinarySearch();
bs.binarySearch(array, n, key);
}
}

public class prg5 {


public static void main(String[] args) {
/*Sort s1=new Sort(1);
Sort s2=new Sort(2);
s1.start();
s2.start();*/
Search s3=new Search();
s3.start();
}
}

6. Consider a scenario similar to Producer/Consumer problem in day to day life where son is
studying engineering in other state, for his expenditure father will be depositing some
money to his account every month. Father will wait until his son notifies him to deposit
money else son will wait until he spends available amount in the account. In this example
depositing (put) and withdrawing (get) is considered as synchronized method executed by
father and son on a shared account.

class Q
{
int Balance_Amount;
boolean valueSet = false;

synchronized int get()


{
while(!valueSet)
try
{
wait();
}
catch(InterruptedException e)
{
System.out.println("InterruptedException caught..!!");
}
System.out.println("Got : " + num);
valueSet = false;
notify();
return Balance_Amount;
}

synchronized void put(int amount)


{
while(valueSet)
try
{ wait(); }
catch(InterruptedException e)
{
System.out.println("InterruptedException caught..!!");
}
Balance_Amount = amount;
valueSet = true;
System.out.println("Put : " + Balance_Amount);
notify();
}
}

class Producer implements Runnable


{
Q que;
Producer(Q que)
{
this.que = que;
new Thread(this, "Producer").start();
}

public void run()


{
int amount = 10000;
while(true)
{
que.put(amount);
}
}
}

class Consumer implements Runnable


{
Q que;
Consumer(Q que)
{
this.que = que;
new Thread(this, "Consumer").start();
}

public void run()


{
while(true)
{
que.get();
}
}
}

class PCFixed
{
public static void main(String args[])
{
Q que = new Q();
new Producer(que);
new Consumer(que);
System.out.println("Press Control-C to stop...");
}
}

7. Design a scrolling banner for our Institute, which should display collage name passed from
html page in the scrolling fashion. You should able to scroll the institute name either from
left to right or from right to left.
/*<applet code=”Banner” width=500 height=500>
<param name=”string1” value=”Nitte Meenakshi Institute of technology”>
</applet>*/
import java.applet.Applet;
import java.awt.Graphics;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Banner extends Applet implements Runnable{
String msg; int x;
public void init() {
msg=getparameter(“string1”);
x=500;
new Thread(this).start();
}
public void paint(Graphics g) {
g.drawString(msg, x, 100);
}

public void run() {


while(true){
if(x<=0)
x=500;
else
x-=10;
repaint();
try {
Thread.sleep(500);
} catch (InterruptedException ex) {
Logger.getLogger(Banner.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
}

8. Traffic signal control is a vital problem and it matters our work life and business. Write a
java program that simulates a traffic signal light. ((hint: use SWING, APPLET, EVENT
HANDLING)
a. The program allows the user to select one of three color for the traffic light: red,
yellow, or green with radio buttons. (Manual signal control)
b. Modify the program to display appropriate messages like “stop” or “ready” or “go”
to appear above the buttons in a selected color. Initially there is no message
shown.
c. Automate the Traffic Signal to change Traffic Light periodically.
/*Manual Signal Control*/

package lab_programs;

import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public class Manu_sig extends Applet implements MouseListener {


String color;
public void init() {
// TODO start asynchronous download of heavy resources
color="red";
addMouseListener(this);
}

@Override
public void mouseClicked(MouseEvent e) {
if(color=="red"){
color="green";
}else{
color="red";
}
repaint();
}

@Override
public void paint(Graphics g) {
if(color=="red")
{
g.setColor(Color.red);
g.fillOval(100, 100, 100, 100);
}else{
g.setColor(Color.green);
g.fillOval(100, 100, 100, 100);
}
}

@Override
public void mousePressed(MouseEvent e) { }
@Override
public void mouseReleased(MouseEvent e) { }
@Override
public void mouseEntered(MouseEvent e) { }
@Override
public void mouseExited(MouseEvent e) { }
}
/*Automatic Signal Control*/
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Auto_Sig extends Applet implements Runnable {


String color; int x;
public void init() {
color="red";
x=0;
new Thread(this).start();
}

@Override
public void run() {
while(true){
if(x<=0 && color=="red")
{
color="green"; x=40;
}else{
color="red"; x=20;
}
while(x!=0){
x-=1;
repaint();
try {
Thread.sleep(500);
} catch (InterruptedException ex) { }
}
}
}

@Override
public void paint(Graphics g) {
g.drawString(x+"", 50, 50);
if(color=="red")
{
g.setColor(Color.red);
g.fillOval(100, 100, 100, 100);
}else{ g.setColor(Color.green);
g.fillOval(100, 100, 100, 100);
}
}
}

9. We need our class time tables to be prepared and displayed. Given Day, time and Subjects
of the classes in a flat files (filename.txt file), a Java program needs to be constructed for
displaying the time table for a section. (hint: use SWING CONTROLS, FILE OPERATION)
a. The elements in the flat files are separated by commas.
b. Modify the program to support elements in the file separated using single space
separator.
c. Display the data from flat file in the table control.

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;

public class FileToJTable {

public static void main(String[] args) {


Runnable r = new Runnable() {

public void run() {


new FileToJTable().createUI();
}
};

EventQueue.invokeLater(r);
}
private void createUI() {

try {
JFrame frame = new JFrame();
frame.setLayout(new BorderLayout());
JTable table = new JTable();

String readLine = null;

TimeTableModel tableModel = new TimeTableModel();


File file = new File("TimeTable.txt");

FileReader reader = new FileReader(file);


BufferedReader bufReader = new BufferedReader(reader);

List<TimeTable> timeTableList = new ArrayList<TimeTable>();


while((readLine = bufReader.readLine()) != null) {
String[] splitData = readLine.split(";");

TimeTable timetable = new TimeTable();


timetable.setDay(splitData[0]);
timetable.setTime(splitData[1]);
timetable.setSubject(splitData[2]);

timeTableList.add(timetable);
}

tableModel.setList(timeTableList);
table.setModel(tableModel);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(new JScrollPane(table));
frame.setTitle("File to JTable");
frame.pack();
frame.setVisible(true);

} catch(IOException ex) {}

class TimeTable {

private String Day;


private String Time;
private String Subject;

public String getDay() {


return Day;
}
public void setDay(String Day) {
this.Day = Day;
}
public String getTime() {
return Time;
}
public void setTime(String Time) {
this.Time = Time;
}
public String getSubject() {
return Subject;
}
public void setSubject(String Subject) {
this.Subject = Subject;
}
}

class TimeTableModel extends AbstractTableModel {

private List<TimeTable> list = new ArrayList<TimeTable>();


private String[] columnNames = {"Day", "Time","Subject"};

public void setList(List<TimeTable> list) {


this.list = list;
fireTableDataChanged();
}

@Override
public String getColumnName(int column) {
return columnNames[column];
}

public int getRowCount() {


return list.size();
}

public int getColumnCount() {


return columnNames.length;
}

public Object getValueAt(int rowIndex, int columnIndex) {


switch (columnIndex) {
case 0:
return list.get(rowIndex).getDay();
case 1:
return list.get(rowIndex).getTime();
case 2:
return list.get(rowIndex).getSubject();
default:
return null;
}
}
}
}

TimeTable.txt

Monday; 11.00am-11.55am; Application Development Using JAVA


Tuesday; 10.05am-11.00am; DATA MINING

Expected Output:
10. Human resource management is a major challenge for any organization with thousands of
employees spread over many regions. Employee information, salary structure, service
details, promotion due date etc. have to be maintained and updated periodically. Web
based solution or a desktop solution will be of great help in such cases. (hint: use
COLLECTIONS, DATABASE & CLIENT SERVER)
a. Construct a Java program to create the employee database, display the information
and allow entries to be added or removed from the client side.
b. Provide methods to display Employee information, salary structure, service details,
promotion due date etc. in the web page.
c. Sort the employees based on Emp ID and Display
d. Demonstrate the use of iterator in collections

You might also like