URGENT!! all the JAVA EXPERTS plssss help me!!

thanks for replying me....i m actually doing a coursework that i have to submit by next monday 29/4/2002. and i havent finish it yet.... ok .. finally i have finish level 1, now i m doing level two...

my program in level 2 should :

a.) Allow the user to specify certain criteria for a room that they wish to book on a particular day. e.g. X number of people, video conferencing, your program should find an appropriate room for them that is free on that day.

b.) Allow the user to add more rooms to the system and make these available to the user to book.

c.) Allow a user to attempt to delete a room. The room will only be deleted if it has no bookings.

d.) Allow the user to ask the system to find the minimum fit room free e.g.

* the smallest room to hold X people that has a connection to the internet.

* if the user requests a room for 40 people and there are rooms free for 50 and 60 people, then

it will allocate them the room for 50.

i really donno how to do....pls help me....

there is something wrong in the METHOD --> AddDeleteRoom()

and i donno how to code the AddNewRoom()

i need to add more rooms into my array

u can download these coding .....i got three files, 1 is the main class call CC.java, another 1 is the class filewhich is Rooms.java and the third file is CC.html file.

dont worry, u can save all the coding in here.... i try b4 it can run.....

<<save as CC.java>>

import java.awt.*;

import java.awt.event.*;

import javax.swing.event.*;

import javax.swing.JApplet;

import javax.swing.*;

import javax.swing.border.*;

import javax.swing.JOptionPane;

public class CC extends JApplet implements ActionListener,ItemListener

{

JPanel pnlPane = new JPanel();

JPanel pnlChoise = new JPanel();

JPanel pnlButton2 = new JPanel();

JPanel pnlRoomDisplay = new JPanel();

JPanel pnlRoom = new JPanel();

JPanel pnlDisplay = new JPanel();

JPanel pnlClear = new JPanel();

JButton btnDisplay = new JButton("Display");

JButton btnBookRoom = new JButton("Book Room");

JButton btnDelBookRoom = new JButton("Delete Booking");

JButton btnDelRoom = new JButton("Delete Room");

JButton btnAddNewRoom = new JButton("Add New Room");

JButton btnClear = new JButton("Clear");

JButton btnRoomQuery = new JButton("Room Query");

Rooms []room = new Rooms[11];

String[] Days = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};

int [][] book = new int[11][7];

public int R, D;

JLabel lblRoomName = new JLabel();

JLabel lblCapacity = new JLabel();

JLabel lblInternet = new JLabel();

JLabel lblVideo = new JLabel();

JLabel lblStatus = new JLabel();

JComboBox cDays= new JComboBox(Days);

JComboBox cRooms = new JComboBox();

JTextField txtRoomName1 = new JTextField();

JTextField txtCapacity1 = new JTextField();

JCheckBox chkInternet = new JCheckBox("Internet Connection");

JCheckBox chkVideo = new JCheckBox("Video Conferencing");

JTextArea txtDisplay = new JTextArea("*****Rooms Detail*****" + "\n",12,30);

public void init()

{

pnlPane.add(pnlChoise);

pnlPane.add(pnlButton2);

pnlPane.add(pnlRoomDisplay);

pnlPane.add(pnlRoom);

pnlPane.add(pnlDisplay);

pnlPane.add(pnlClear);

pnlPane.setBorder(new TitledBorder(new BevelBorder(BevelBorder.RAISED),"Room Booking System"));

setContentPane(pnlPane);

AddChoisePanel();

AddButton2Panel();

AddRoomDisplayPanel();

AddRoomPanel();

AddDisplayAreaPanel();

AddClearPanel();

}

public void AddChoisePanel()

{

pnlChoise.setLayout(new GridLayout(1,3,5,5));

room[0]=new Rooms("Barrington","15","No","Yes");

room[1]=new Rooms("Carlton","25","Yes","No");

room[2]=new Rooms("Debyshire","35","No","No");

room[3]=new Rooms("Edwards","30","Yes","Yes");

room[4]=new Rooms("Farley","70","Yes","No");

room[5]=new Rooms("Goodwin","80","Yes","Yes");

room[6]=new Rooms("Harlow","90","No","Yes");

room[7]=new Rooms("IlFord","85","No","No");

for (int i=0; i<8; i++)

cRooms.addItem(room.rName);

pnlChoise.add(cRooms);

pnlChoise.add(cDays);

pnlChoise.add(btnRoomQuery);

btnRoomQuery.addActionListener(this);

cRooms.addItemListener(this);

}

public void AddButton2Panel()

{

pnlButton2.setLayout(new GridLayout(1,2,5,5));

pnlButton2.add(btnBookRoom);

pnlButton2.add(btnDelBookRoom);

btnDelBookRoom.addActionListener(this);

btnBookRoom.addActionListener(this);

}

public void AddRoomDisplayPanel()

{

pnlRoomDisplay.setLayout(new GridLayout(6,2,5,2));

pnlRoomDisplay.add(new JLabel("Room Name" ));

pnlRoomDisplay.add(lblRoomName);

pnlRoomDisplay.add(new JLabel("Room Capacity"));

pnlRoomDisplay.add(lblCapacity);

pnlRoomDisplay.add(new JLabel("Internet Connection"));

pnlRoomDisplay.add(lblInternet);

pnlRoomDisplay.add(new JLabel("Video Conferencing"));

pnlRoomDisplay.add(lblVideo);

pnlRoomDisplay.add(new JLabel("Room Status"));

pnlRoomDisplay.add(lblStatus);

pnlRoomDisplay.setBorder(new TitledBorder(new BevelBorder(BevelBorder.LOWERED),"Rooms Detail"));

pnlRoomDisplay.add(btnDelRoom);

btnDelRoom.addActionListener(this);

}

public void AddRoomPanel()

{

pnlRoom.setLayout(new GridLayout(6,2,2,2));

pnlRoom.setBorder(new TitledBorder(new BevelBorder(BevelBorder.LOWERED),"Add New Rooms"));

pnlRoom.add(new Label("Room Name"));

pnlRoom.add(txtRoomName1);

pnlRoom.add(new Label("Capacity"));

pnlRoom.add(txtCapacity1);

pnlRoom.add(chkInternet);

pnlRoom.add(new Label(""));

pnlRoom.add(chkVideo);

pnlRoom.add(new Label(""));

pnlRoom.add(new Label(""));

pnlRoom.add(new Label(""));

pnlRoom.add(btnAddNewRoom);

btnAddNewRoom.addActionListener(this);

}

public void AddDisplayAreaPanel()

{

pnlDisplay.setLayout(new GridLayout(1,1));

//pnlDisplay.setBorder(new TitledBorder(new BevelBorder(BevelBorder.LOWERED),"Rooms Detail"));

Border pnlDisplayBorder = BorderFactory.createTitledBorder("Rooms Detail");

pnlDisplay.setBorder(pnlDisplayBorder);

pnlDisplay.add(txtDisplay);

}

public void AddClearPanel()

{

pnlClear.setLayout(new GridLayout(1,1));

pnlClear.add(btnClear);

btnClear.addActionListener(this);

}

public void actionPerformed(ActionEvent event)

{

//to call RoomQuery function

if (event.getSource() == btnRoomQuery){

AddRoomQuery(); }

else

{

//to call DeleteBookRoom function

if (event.getSource() == btnDelBookRoom){

AddDeleteBookRoom(); }

else

{

//to call DeleteRoom function

if (event.getSource() == btnDelRoom){

AddDeleteRoom(); }

else

{

//to call AddNewRoom function

if (event.getSource() == btnAddNewRoom){

AddNewRoom(); }

else

{

//to call ClearTextArea function

if (event.getSource() == btnClear){

AddClearTextArea(); }

else

{

//to call BookRoom function

if (event.getSource() == btnBookRoom){

AddBookRoom(); }

}

}

}

}

}

}

public void AddRoomQuery()

{

R= (int) cRooms.getSelectedIndex();

D = (int) cDays.getSelectedIndex();

JOptionPane.showMessageDialog(null, R + " " + D);

txtDisplay.setText(" *************** Room Status For "+ Days[D] + " *************** " + "\n");

txtDisplay.append("Rooms" + "\t\t " + " Status");

for (int t=0; t< (int) cRooms.getItemCount(); t++)

{ JOptionPane.showMessageDialog(null," is" + cRooms.getItemCount());

if (book[t][D]==0)

{

txtDisplay.append("\n" + ">>" + room[t].rName);

txtDisplay.append("\t\t " + " Room is Available");

}

else

{

if (book[t][D]==1)

{

txtDisplay.append("\n" + ">>" + room[t].rName);

txtDisplay.append("\t\t " + " Room Booked");

}

}

}

JOptionPane.showMessageDialog(null, "end " );

}

public void AddDeleteBookRoom()

{

R = (int) cRooms.getSelectedIndex();

D = (int) cDays.getSelectedIndex();

if(book[R][D] == 1)

{

txtDisplay.setText("*****Rooms Detail*****" + "\n" + "Room is Available" + "\n");

book[R][D] = 0;

}

else

{

txtDisplay.setText("*****Rooms Detail*****" + "\n" + "Room Available"+ "\n");

book[R][D] = 0;

}

}

public void AddDeleteRoom()

{

R = (int) cRooms.getSelectedIndex();

D = (int) cDays.getSelectedIndex();

JOptionPane.showMessageDialog(null,"Room selected index " + R);

int intCount =(int) cRooms.getSelectedIndex();

if (intCount != -1)

{

if(book[R][D] == 0 )

{

JOptionPane.showMessageDialog(null,"Room "+room[intCount].rName + " had Deleted");

cRooms.removeItemAt(intCount);

int i;

for( i=intCount;i< cRooms.getItemCount();i++)

JOptionPane.showMessageDialog(null,"Room "+room[i+1].rName + "to");

room=new Rooms(room[i+1]);

JOptionPane.showMessageDialog(null,"Room "+ room.rName );

//cRooms.getSelectedIndex());

// intCount--;

}

else

{

if(book[R][D] == 1 )

{

JOptionPane.showMessageDialog(null,"Room "+room[intCount].rName+" Can Not be Delete");

}

}

}

else

{

JOptionPane.showMessageDialog(null,"Select A Room To be Delete ");

}

}

public void AddNewRoom()

{

JOptionPane.showMessageDialog(null,"Add new room");

}

public void AddClearTextArea()

{

txtDisplay.setText("*****Rooms Detail*****" + "\n");

}

public void AddBookRoom()

{

R= (int) cRooms.getSelectedIndex();

D = (int) cDays.getSelectedIndex();

if(book[R][D] == 0)

{

txtDisplay.setText("*****Rooms Detail*****" + "\n" + "Room is Booked" + "\n");

book[R][D] = 1;

}

else

{

txtDisplay.setText("*****Rooms Detail*****" + "\n" + "Room Not Available"+ "\n");

book[R][D] = 1;

}

}

public void itemStateChanged(ItemEvent itv)

{

if( itv.getSource() == cRooms )

{

R = (int) cRooms.getSelectedIndex();

lblRoomName.setText(room[R].rName);

lblCapacity.setText(room[R].rCapacity);

lblInternet.setText(room[R].rInternet);

lblVideo.setText(room[R].rVideo);

// lblStatus.setText(room[R].rStatus);

}

}

}

<<save as Rooms.java>>

public class Rooms

{

String rName;

String rCapacity;

String rInternet;

String rVideo;

// String rStatus;

Rooms(String a, String b, String c, String d)//, String e)

{

rName = a;

rCapacity = b;

rInternet = c;

rVideo = d;

// rStatus = e;

}

Rooms(Rooms r)

{

rName = r.rName;

rCapacity = r.rCapacity;

rInternet = r.rInternet;

rVideo = r.rVideo;

// rStatus = r.e;

}

}

<<saves as CC.html>>

<html>

<body>

<Applet code = CC.class

width = 600

height = 510>

</Applet>

</body>

</html>

[12179 byte] By [swisswk78] at [2007-9-19]
# 1

a.) This is practically the same functionality as d.

b.) To add more rooms you shouldn't use an array, you should use a List. This enables you to add and remove objects from it (it's kinda like an array that changes size).

c.) Deleting a room from the list should be easy (using List.remove) - checking whether there is a booking on the room might be a bit harder. If you were to store your bookings within the Rooms class (why not call it Room, btw?) then all you'd need to do was ask the Room if it contained any bookings. Similarly, you could store the bookings in a List inside the Room class.

d) Your room should store various attributes relating to the features it possesses - you're currently storing these as "yes"/"no" strings but perhaps most of them would be better as booleans? Your Rooms class could then have a method to tell you whether it matches a particular set of criteria eg, public boolean matches(boolean internet, boolean video). To find the "best" room all you need to do is loop over all the rooms, if a room matches the criteria check its size, remembering the room that has the closest sufficient capacity.

Some more general comments:

Does it have to be an Applet - this imposes security restrictions and prevents the application running on its own?

The system only permits bookings over a one week period. Again, if you were to store bookings inside the Room class you could store them as a Date so that it would accept bookings for any point in the future.

The state is not persisted anywhere - when you close it and open it again it will have forgotten all the bookings and rooms.

You should attempt to get help from your tutor - they will almost certainly be happy to help providing you ask them and will be able to give far more useful advice than we can give on a forum.

Hope this helps.

KPSeal at 2007-7-5 > top of java,Archived Forums,Java Programming [Archive]...
# 2

The important thing is to put the related functionality in the class Room and not everywhere in the class CC.

The types of the data member in the class Room are also very important to reflect exactly what they should store.

Here I post a new version of your files as example of how we can improve your version. It does not implement all the functionality you will need but it is a first step.

Serge

import java.awt.*;

import java.awt.event.*;

import javax.swing.event.*;

import javax.swing.JApplet;

import javax.swing.*;

import javax.swing.border.*;

import javax.swing.JOptionPane;

import java.util.LinkedList;

public class CC extends JApplet implements ActionListener, ItemListener {

JPanel pnlPane = new JPanel();

JPanel pnlChoise = new JPanel();

JPanel pnlButton2 = new JPanel();

JPanel pnlRoomDisplay = new JPanel();

JPanel pnlRoom = new JPanel();

JPanel pnlDisplay = new JPanel();

JPanel pnlClear = new JPanel();

JButton btnDisplay = new JButton("Display");

JButton btnBookRoom = new JButton("Book Room");

JButton btnDelBookRoom = new JButton("Delete Booking");

JButton btnDelRoom = new JButton("Delete Room");

JButton btnAddNewRoom = new JButton("Add New Room");

JButton btnClear = new JButton("Clear");

JButton btnRoomQuery = new JButton("Room Query");

LinkedList roomList = new LinkedList();

String[] Days = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};

public int R, D;

JLabel lblRoomName = new JLabel();

JLabel lblCapacity = new JLabel();

JLabel lblInternet = new JLabel();

JLabel lblVideo = new JLabel();

JLabel lblStatus = new JLabel();

JComboBox cDays = new JComboBox(Days);

JComboBox cRooms = new JComboBox();

JTextField txtRoomName1 = new JTextField();

JTextField txtCapacity1 = new JTextField();

JCheckBox chkInternet = new JCheckBox("Internet Connection");

JCheckBox chkVideo = new JCheckBox("Video Conferencing");

JTextArea txtDisplay = new JTextArea("*****Rooms Detail*****" + "\n", 12, 30);

public void init() {

pnlPane.add(pnlChoise);

pnlPane.add(pnlButton2);

pnlPane.add(pnlRoomDisplay);

pnlPane.add(pnlRoom);

pnlPane.add(pnlDisplay);

pnlPane.add(pnlClear);

pnlPane.setBorder(new TitledBorder(new BevelBorder(BevelBorder.RAISED), "Room Booking System"));

setContentPane(pnlPane);

AddChoisePanel();

AddButton2Panel();

AddRoomDisplayPanel();

AddRoomPanel();

AddDisplayAreaPanel();

AddClearPanel();

}

public void AddChoisePanel() {

pnlChoise.setLayout(new GridLayout(1, 3, 5, 5));

Room[]room = new Room[8];

room[0] = new Room("Barrington", "15", false, true);

room[1] = new Room("Carlton", "25", true, false);

room[2] = new Room("Debyshire", "35", false, false);

room[3] = new Room("Edwards", "30", true, true);

room[4] = new Room("Farley", "70", true, false);

room[5] = new Room("Goodwin", "80", true, true);

room[6] = new Room("Harlow", "90", false, true);

room[7] = new Room("IlFord", "85", false, false);

for (int i = 0; i < 8; i++) {

cRooms.addItem(room[i].getName());

roomList.add(room[i]);

}

pnlChoise.add(cRooms);

pnlChoise.add(cDays);

pnlChoise.add(btnRoomQuery);

btnRoomQuery.addActionListener(this);

cRooms.addItemListener(this);

}

public void AddButton2Panel() {

pnlButton2.setLayout(new GridLayout(1, 2, 5, 5));

pnlButton2.add(btnBookRoom);

pnlButton2.add(btnDelBookRoom);

btnDelBookRoom.addActionListener(this);

btnBookRoom.addActionListener(this);

}

public void AddRoomDisplayPanel() {

pnlRoomDisplay.setLayout(new GridLayout(6, 2, 5, 2));

pnlRoomDisplay.add(new JLabel("Room Name"));

pnlRoomDisplay.add(lblRoomName);

pnlRoomDisplay.add(new JLabel("Room Capacity"));

pnlRoomDisplay.add(lblCapacity);

pnlRoomDisplay.add(new JLabel("Internet Connection"));

pnlRoomDisplay.add(lblInternet);

pnlRoomDisplay.add(new JLabel("Video Conferencing"));

pnlRoomDisplay.add(lblVideo);

pnlRoomDisplay.add(new JLabel("Room Status"));

pnlRoomDisplay.add(lblStatus);

pnlRoomDisplay.setBorder(new TitledBorder(new BevelBorder(BevelBorder.LOWERED), "Rooms Detail"));

pnlRoomDisplay.add(btnDelRoom);

btnDelRoom.addActionListener(this);

}

public void AddRoomPanel() {

pnlRoom.setLayout(new GridLayout(6, 2, 2, 2));

pnlRoom.setBorder(new TitledBorder(new BevelBorder(BevelBorder.LOWERED), "Add New Rooms"));

pnlRoom.add(new Label("Room Name"));

pnlRoom.add(txtRoomName1);

pnlRoom.add(new Label("Capacity"));

pnlRoom.add(txtCapacity1);

pnlRoom.add(chkInternet);

pnlRoom.add(new Label(""));

pnlRoom.add(chkVideo);

pnlRoom.add(new Label(""));

pnlRoom.add(new Label(""));

pnlRoom.add(new Label(""));

pnlRoom.add(btnAddNewRoom);

btnAddNewRoom.addActionListener(this);

}

public void AddDisplayAreaPanel() {

pnlDisplay.setLayout(new GridLayout(1, 1));

//pnlDisplay.setBorder(new TitledBorder(new BevelBorder(BevelBorder.LOWERED),"Rooms Detail"));

Border pnlDisplayBorder = BorderFactory.createTitledBorder("Rooms Detail");

pnlDisplay.setBorder(pnlDisplayBorder);

pnlDisplay.add(txtDisplay);

}

public void AddClearPanel() {

pnlClear.setLayout(new GridLayout(1, 1));

pnlClear.add(btnClear);

btnClear.addActionListener(this);

}

public void actionPerformed(ActionEvent event) {

//to call RoomQuery function

if (event.getSource() == btnRoomQuery) {

AddRoomQuery();

} else {

//to call DeleteBookRoom function

if (event.getSource() == btnDelBookRoom) {

AddDeleteBookRoom();

} else {

//to call DeleteRoom function

if (event.getSource() == btnDelRoom) {

AddDeleteRoom();

} else {

//to call AddNewRoom function

if (event.getSource() == btnAddNewRoom) {

AddNewRoom();

} else {

//to call ClearTextArea function

if (event.getSource() == btnClear) {

AddClearTextArea();

} else {

//to call BookRoom function

if (event.getSource() == btnBookRoom) {

AddBookRoom();

}

}

}

}

}

}

}

public void AddRoomQuery() {

R = (int) cRooms.getSelectedIndex();

D = (int) cDays.getSelectedIndex();

//JOptionPane.showMessageDialog(null, R + " " + D);

txtDisplay.setText(" *************** Room Status For " + Days[D] + " *************** " + "\n");

txtDisplay.append("Rooms" + "\t\t " + " Status");

Room aRoom = (Room)roomList.get(R);

for (int t = 0; t < (int) cRooms.getItemCount(); t++) {

//JOptionPane.showMessageDialog(null, " is" + cRooms.getItemCount());

aRoom = (Room)roomList.get(t);

txtDisplay.append("\n" + ">>" + aRoom.getName());

if (aRoom.isBooked(D)) {

txtDisplay.append("\t\t " + " Room Booked");

} else {

txtDisplay.append("\t\t " + " Room is Available");

}

}

//JOptionPane.showMessageDialog(null, "end ");

}

public void AddDeleteBookRoom() {

R = (int) cRooms.getSelectedIndex();

D = (int) cDays.getSelectedIndex();

Room aRoom = (Room)roomList.get(R);

aRoom.checkOut(D);

txtDisplay.setText("*****Rooms Detail*****" + "\n" + "Room is Available" + "\n");

}

public void AddDeleteRoom() {

R = (int) cRooms.getSelectedIndex();

D = (int) cDays.getSelectedIndex();

//JOptionPane.showMessageDialog(null, "Room selected index " + R);

int intCount = (int) cRooms.getSelectedIndex();

Room aRoom = (Room)roomList.get(R);

if (intCount != -1) {

if (aRoom.isBooked() == false) {

JOptionPane.showMessageDialog(null, "Room " + ((Room)roomList.get(intCount)).getName() + " had Deleted");

cRooms.removeItemAt(intCount);

roomList.remove(intCount);

} else {

JOptionPane.showMessageDialog(null, "Room " + ((Room)roomList.get(intCount)).getName() + " Can Not be Delete");

}

} else {

JOptionPane.showMessageDialog(null, "Select A Room To be Delete ");

}

}

public void AddNewRoom() {

String rName = txtRoomName1.getText();

String rCapacity = txtCapacity1.getText();

boolean rInternet = chkInternet.isSelected();

boolean rVideo = chkVideo.isSelected();

Room nRoom = new Room(rName,rCapacity,rInternet,rVideo);

cRooms.addItem(rName);

int i = cRooms.getItemCount();

roomList.add(nRoom);

}

public void AddClearTextArea() {

txtDisplay.setText("*****Rooms Detail*****" + "\n");

}

public void AddBookRoom() {

R = (int) cRooms.getSelectedIndex();

D = (int) cDays.getSelectedIndex();

Room aRoom = (Room)roomList.get(R);

if (aRoom.reserve(D) == 0) {

txtDisplay.setText("*****Rooms Detail*****" + "\n" + "Room is Booked" + "\n");

} else {

txtDisplay.setText("*****Rooms Detail*****" + "\n" + "Room Not Available" + "\n");

}

}

public void itemStateChanged(ItemEvent itv) {

if (itv.getSource() == cRooms) {

R = (int) cRooms.getSelectedIndex();

Room aRoom = (Room)roomList.get(R);

lblRoomName.setText(aRoom.getName());

lblCapacity.setText(String.valueOf(aRoom.getCapacity()));

lblInternet.setText(aRoom.getInternet());

lblVideo.setText(aRoom.getVideo());

// lblStatus.setText(aRoom.rStatus);

}

}

}

public class Room {

public final String YES = "Yes";

public final String NO = "No";

private String rName = null;

private int rCapacity = 0;

private boolean rInternet = false;

private boolean rVideo = false;

private boolean [] booked = { false, false, false, false, false, false, false };

Room(String name, String capacity, boolean hasInternet, boolean hasVideo)

{

rName = new String(name);

rCapacity = Integer.parseInt(capacity);

rInternet = hasInternet;

rVideo = hasVideo;

}

public int reserve(int day) {

if (booked[day] == true)

return -1;

booked[day] = true;

return 0;

}

public void checkOut(int day) {

booked[day] = false;

}

public boolean isBooked() {

for (int i = 0; i < booked.length; i++)

if (booked[i] == true)

return true;

return false;

}

public boolean isBooked(int day) {

return booked[day];

}

public String getName() {

return rName;

}

public int getCapacity() {

return rCapacity;

}

public String getInternet() {

if (rInternet == false)

return NO;

return YES;

}

public String getVideo() {

if (rVideo == false)

return NO;

return YES;

}

public boolean matchCriterias(boolean hasInternet, boolean hasVideo) {

if ((hasInternet == rInternet) && (hasVideo == rVideo))

return true;

return false;

}

}

sergep at 2007-7-5 > top of java,Archived Forums,Java Programming [Archive]...
# 3
thank you very much... i really need u guys help....and i will try my new program later when i log off....and he he,,,, i m here to say thank you to u....:)wai kuan from malaysia
swisswk78 at 2007-7-5 > top of java,Archived Forums,Java Programming [Archive]...
# 4

What about these ?

a.) Allow the user to specify certain criteria for a room that they wish to book on a particular day. e.g. X number of people, video conferencing, your program should find an appropriate room for them that is free on that day.

b.) Allow the user to ask the system to find the minimum fit room free e.g.

* the smallest room to hold X people that has a connection to the internet.

* if the user requests a room for 40 people and there are rooms free for 50 and 60 people, then

it will allocate them the room for 50.

c.) Delete a room, if it has a booking, delete it only a next booking is vacant with equal or mote capacity

Question, what will one use to do these task ?

sjack13 at 2007-7-5 > top of java,Archived Forums,Java Programming [Archive]...