JAVA PROGRAMING QUESTION, Hotel Reservation Sysytem

  • Comp Sci
  • Thread starter blah45
  • Start date
  • Tags
    Java
In summary, the conversation discusses the system requirements for a new hotel reservation system to be developed by the software company BestSolutions Ltd for the L4 chain of hotels. The system should handle reservations, cancellations, hotel stays, and billing. The reservation system should also maintain reservation information, hotel stay information, and cancellation information for at least 7 years. Additionally, the system should provide data analysis on hotel stays and billing for the hotels. There will be three types of users for the system: supervisors, hotel desk personnel, and customers. The conversation also mentions a .csv file with information about the 5, 4, and 3 star hotels, which includes the number of rooms, minimum and maximum occupancy, and rates per day
  • #1
blah45
65
0
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 chain may expand or contract in the future. The reservation system
needs to handle reservations, cancellations, hotel stays (check-in, check-out) and billing.

A booking/reservation can be either a standard booking (S) or an advance purchase
booking (AP). A 5% discount applies to all AP reservations.

The cancellation policy is as follows:
Advance purchase bookings are non-refundable. For a standard booking, the full booking value will be charged if the cancellation is received within 48 hours of arrival or if the booking is a ‘no-show’.

A very simple reservation would allow one room to be reserved. However the contract
with L4 states that a single reservation should facilitate many room bookings.

Reservation information should be maintained on the system (i.e. in a comma separated
value (csv) file). Reservations can be removed from the system one month after the date
of departure, given that the reservation has been processed (this probably means changed to a cancellation or a hotel stay). The following is the type of information that should be
recorded for a reservation:
Reservation number
Reservation name
Reservation type (S/AP)
Check-in date
Number of nights
Number of rooms
For each room
o Room type
o Occupancy (number of adults/children)
o Breakfast included
Total cost
Deposit

L4 requires that all hotel stay information and cancellation information should also be
maintained on the system (again in separate csv files). This information must be stored
for at least 7 years for tax and audit purposes.

One of the main reasons that BestSolutions won the tender for this contract was that it
proposed to provide some analysis on the hotel stays and billing data for L4 hotels. This
analysis will provide L4 hotels with the ability to better assess their current offerings,
including room prices and to tailor special packages in the future. This data analysis
should provide occupancy figures/rates for each of the hotels and room type over a
specific period of time. The billing/accounts information should provide a summary of
the financial status of the business. Any of this data could be requested for monthly,
weekly or daily intervals or for specific days over the period. The requested data should
be output to (a) comma separated value (csv) file(s).
There will be three types of users for the system: supervisors, hotel desk personnel and
customers. A customer will be able to make reservations and cancellations. A hotel desk
administrator will also be able to make reservations and cancellations for a customer.
They will also be able to handle check-in and check-out services. A supervisor will be
able to do all the things that a hotel desk administrator can do but may also be able to
apply discounts to bookings as well as requesting any of the data analysis described
above.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++I know you can't give me an answer but i don't exactly know where to start, if someone could just nudge me in the right direction as to where to start that would be great.

For my classes I'm thinking of

A Hotel class
A Room class
A reservation class
Customer class
Staff class
Supervisor class
Statistics class

I was given an excel with information about the 5, 4 and 3 star hotels.
So there rooms available, min & max occupence and rates per day.

Again I am only looking for a place to start, Do i need to read the information about the hotels to implement the class(es)

Any help would be appreciated

Thanks a million!
 
Last edited:
Physics news on Phys.org
  • #2
I don't think you should be concerning yourself with all of the classes you listed (hotel, room, staff, etc.). The one class that jumps out at me is for reservations.
CathalCronin said:
Reservation information should be maintained on the system (i.e. in a comma separated
value (csv) file). Reservations can be removed from the system one month after the date
of departure, given that the reservation has been processed (this probably means changed to a cancellation or a hotel stay). The following is the type of information that should be
recorded for a reservation:
Reservation number
Reservation name
Reservation type (S/AP)
Check-in date
Number of nights
Number of rooms
For each room
o Room type
o Occupancy (number of adults/children)
o Breakfast included
Total cost
Deposit
 
  • #3
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 the file about the hotels and display the relevant room info.
Is that right so far?

I'll try get up some code so at least I'll have a starting point, but ill focus on the reservation class first.
 
  • #4
You probably will need a Room class that maintains information about a single room. I don't think you need a Hotel class, as you could represent a hotel as an array of type Room.

I don't see anything in the problem description that gives any details about room type. Is there additional information that you haven't posted?
 
  • #5
View attachment L4Hotels.txt

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
 
  • #6
Code:
 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 day input \nTry again") ;
                    day = input.nextInt() ;
                }

                System.out.println("Please enter the month you want to book. E.g 03 (3rd month)") ;
                int month = input.nextInt() ;
                if(month < 0 && month > 12)
                {
                    System.out.println("Invalid month input \nTry again") ;
                    month = input.nextInt() ;
                }
                month-- ;

                System.out.println("Please enter the year you want to book. E.g 2012 (year)") ;
                int year = input.nextInt() ;

                System.out.println("Please enter the hour you would like to check in at. E.g 12(12 pm)") ;
                int hour = input.nextInt() ;

                System.out.println("Please enter the minutes you would like to check in at. E.g 12(12 pm)") ;
                int min = input.nextInt() ;

                Calendar calendar = new GregorianCalendar(year,month,day,hour,min) ;
                Calendar current = new GregorianCalendar()   ;
                checkOut = new GregorianCalendar(year,month,day,12,00) ;

                checkIn = (Date)calendar.getTime() ;     

                checkOut.add(Calendar.DAY_OF_WEEK,+numOfNights);
                checkingOut = (Date)checkOut.getTime() ;

                total  = 0 ;
                for(int k = 0 ; k < numOfNights ; k++)
                {       

                    total = total + rate[checkIn.getDay() + k];

                }
                if(checkIn.before(current.getTime()) )
                {
                    System.out.println("Date is in the past\nTry again!") ;

                }
                else
                {
                    correctDate = true ;
                }
            }
 
  • #7
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?
 
  • #8
I don't see anything in your code that works with the days of the week (i.e., Tuesday and so on). Also, it doesn't seem that the problem you describe is a result of the code you showed in post 6. I could be wrong, but could the problem be occurring in some other code that you didn't show? I don't see where the rollover you mentioned is happening.
 

Related to JAVA PROGRAMING QUESTION, Hotel Reservation Sysytem

1. What is Java Programming?

Java programming is a high-level, object-oriented programming language used to create various applications and systems. It was developed by Sun Microsystems in 1995 and is widely used for web, desktop, and mobile development.

2. What is a Hotel Reservation System?

A Hotel Reservation System is a software application that allows customers to book hotel rooms online. It manages the entire booking process, from availability and pricing to payment and confirmation.

3. How does Java Programming relate to Hotel Reservation Systems?

Java programming is commonly used to develop Hotel Reservation Systems because of its flexibility, platform independence, and scalability. It allows for the creation of a robust and efficient system that can handle large amounts of data and transactions.

4. What are the key features of a Hotel Reservation System?

The key features of a Hotel Reservation System include real-time availability and pricing, easy booking process, secure payment options, multiple language and currency support, and integration with other systems such as property management and accounting.

5. How can a Hotel Reservation System benefit a hotel?

A Hotel Reservation System can benefit a hotel by increasing its efficiency, reducing manual tasks, improving customer experience, and increasing revenue. It also allows for better management of room inventory and pricing, as well as providing valuable data and analytics for decision making.

Similar threads

  • Programming and Computer Science
2
Replies
48
Views
9K
  • General Engineering
Replies
23
Views
3K
Replies
10
Views
2K
  • Art, Music, History, and Linguistics
Replies
1
Views
1K
  • STEM Academic Advising
Replies
2
Views
2K
  • Special and General Relativity
2
Replies
42
Views
5K
  • Science Fiction and Fantasy Media
Replies
8
Views
4K
  • Sticky
  • Engineering and Comp Sci Homework Help
Replies
1
Views
20K
  • STEM Academic Advising
Replies
4
Views
2K
Back
Top