Recent content by blah45

  1. B

    Comp Sci JAVA PROGRAMING QUESTION, Hotel Reservation Sysytem

    I'm trying to work out the rates of for the reservation. It calculates it for the period of a given week so if you book from Tuesday to Friday. it does that fine but if I say book from Saturday to Wednesday it doesn't work. so whenever there is a roll over into a new week it stops. Any suggestions?
  2. B

    Comp Sci JAVA PROGRAMING QUESTION, Hotel Reservation Sysytem

    while(correctDate == false) { System.out.println("Please enter the date you want to book. E.g 08 (8th of month)") ; int day = input.nextInt() ; if(day < 0 && day > 31) { System.out.println("Invalid...
  3. B

    Comp Sci JAVA PROGRAMING QUESTION, Hotel Reservation Sysytem

    This is a .csv file if you open it in excel it will show you all the information about a 5 ,4 and 3 star hotel so there rooms, amount available min and max occupancy and the rates per day. I think i uploaded it right
  4. B

    Comp Sci JAVA PROGRAMING QUESTION, Hotel Reservation Sysytem

    Thanks for the reply, So the reservation class should describe what a reservation is, and a reservation will have all those bits of info as mentioned. But when it says, For each room, room type, occupancy etc.. so I am going to need a class to describe that and I am going to have to read from...
  5. B

    Comp Sci JAVA PROGRAMING QUESTION, Hotel Reservation Sysytem

    System Requirements: Congratulations! Your software company BestSolutions Ltd has won the contract to develop a new hotel reservation system for the L4 chain of hotels (check out l4hotels.com! ...or something similar). At present the chain consists of a 5-star, 4-star and 3-star hotel but the...
  6. B

    Comp Sci How Can I Ensure Messages in Java ArrayList Are Sorted by Time Descending Order?

    I was looking up the API for the thread but I don't exactly know how to use it in the driver, does it really matter apart from being "cheesy"?
  7. B

    Comp Sci How Can I Ensure Messages in Java ArrayList Are Sorted by Time Descending Order?

    I'm back again, it works but just wondering do I have to do the Thread.sleep(n) thing or is this(i.e what I have at the moment) okay... public class messageDriver { public static void main(String args[]) { MessageList Inbox = new MessageList() ; int i = 0...
  8. B

    Comp Sci How Can I Ensure Messages in Java ArrayList Are Sorted by Time Descending Order?

    I'll do some other testing and let you know Thanks for all the help, thanks so much, I really do appreciate it.
  9. B

    Comp Sci How Can I Ensure Messages in Java ArrayList Are Sorted by Time Descending Order?

    I just used a for loop and added delay that way and it worked =D
  10. B

    Comp Sci How Can I Ensure Messages in Java ArrayList Are Sorted by Time Descending Order?

    Whe I put that in I get an erroe saying " unreported exception java.lang.InterruptedException ; must be caught or declared to be thrown
  11. B

    Comp Sci How Can I Ensure Messages in Java ArrayList Are Sorted by Time Descending Order?

    The time stamps are the same.. [ messageDriver.main({ }) ] This message is from 123456 at 1:36:59am Hi This message is from 123456 at 1:36:59am Hey was up This message is from 123456 at 1:36:59am Nothing much This message is from 123456 at 1:36:59am k bye This message is from 123456...
  12. B

    Comp Sci How Can I Ensure Messages in Java ArrayList Are Sorted by Time Descending Order?

    Once again the full code is... public void addMsg(Message MsgToAdd) { int i = 0 ; boolean found = false ; Message MsgInList ; if(MessageList.size() == 0) { MessageList.add(MsgToAdd) ; } else...
  13. B

    Comp Sci How Can I Ensure Messages in Java ArrayList Are Sorted by Time Descending Order?

    It's weird 3 are displayed when I run while debugging it, but when the driver runs it only 2 are displayed
  14. B

    Comp Sci How Can I Ensure Messages in Java ArrayList Are Sorted by Time Descending Order?

    I'm using a program called bluej and it has a built in debugger, when it get's to the the 3rd add message method in the driver the if doesn't execute and then the last two do execute, then when it goes into the display the count was equal to 4 not five but this time it displayed 3 messages with...
Back
Top