Find Jobs
Hire Freelancers

Hotel Booking Information

$8-15 CAD / hour

Closed
Posted over 2 years ago

$8-15 CAD / hour

"Please write a program in Java to sort and search hotel booking information. The public interface of BookingManager is described below, along with a ready-to-use class BookingInfo. Please follow the requirements in the description for each method to complete this class. Please also write a tester class to thoroughly test the four methods given in BookingManager. The BookingManager class should contain the following public methods: 1. public ArrayList<BookingInfo> readBookings(string pathName) throws IOException: a. Read all the booking information from the binary file in the local file system as specified by the parameter pathName and return an ArrayList of BookingInfo. b. We assume that each record in the binary file has a fixed length of 60 bytes, with start date stored in the first 20 bytes, end date in next 20 bytes, and id in the last 20 bytes. c. We assume that all the dates in the file are in the format of YYYY-MM-DD. There could be an arbitrary number of records in the file. 2. public ArrayList<BookingInfo> sortBookings(ArrayList<BookingInfo> inputList): a. Write code that implements the merge sort algorithm to sort all the booking information in inputList by start date in a way that recent info shows first. The method returns the list of sorted bookings. 3. Public ArrayList<BookingInfo> removeConflicts(ArrayList<BookingInfo> inputList): a. Use the sorted list of booking info (inputList) to find if there are pairs of bookings with conflict. Having a conflict means that a booking has a start date before the end date of another booking. Whenever there is a conflict, remove the later one. The method returns a new list of booking info with no conflicts. 4. public void saveBookingInfo(String pathName, ArrayList<BookingInfo> sortedList) throws IOException: a. Use RandomAccessFile to save all the ordered booking info from the sortedList to the given pathName on the disk. 5. public ArrayList<BookingInfo> bookingSearch(String pathName, Date minDate, Date maxDate) throws IOException: a. Given the date range [minDate, maxDate] (both inclusive) and the pathname of the file that stores the sorted booking info, use binary search to find and return an ArrayList of all the booking info within this date range without loading all the booking info in the file into memory (i.e., do NOT attempt to read all booking info into an array/ArrayList and then perform the search there). If no booking info falls in the date range, the method returns an empty list. As a hint, one way to complete this method is to adapt the binary search algorithm (for arrays) taught in class to the setting of random access files. To retrieve the booking info in a range, you may use binary search to locate within the range the booking info with the given minDate (or if such a booking info does not exist, the first booking info that has a start date that is higher than minDate in the file) and then visit the subsequent records until the date is out of the given range or the end of the file is reached. b. Tips: [login to view URL] RandomAccessFile().seek(long pos) to do random access; 2. Use RandomAccessFile().length() to get the size of file (number of bytes)." "What to submit Submit [login to view URL] only. Please use the exact file name, class name, and method names given here and document it properly using JavaDoc. Nothing else (including [login to view URL], the tester class, and the data files) should be submitted. Compile and test your code under the command line environment (e.g., by executing Terminal under macos or cmd under Windows). DO NOT submit .class files! The file [login to view URL] ONLY."Create a Java program to book h
Project ID: 32274401

About the project

14 proposals
Remote project
Active 2 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
14 freelancers are bidding on average $12 CAD/hour for this job
User Avatar
Good day, I've complete Phd Software Engineering. I've 5-Year experience in Java development and algorithm implementation. My Core Expertise in Java - C++ - C - object-oriented - Data Structure - Swing - OpenGL - JavaFX. I have got your project requirement enough, Please leave a message on my chat so we can discuss the project. Best Regards: Aqeel Ahmed
$15 CAD in 40 days
4.9 (165 reviews)
6.6
6.6
User Avatar
Hi There , In description of project I read you need a app for Hotel Booking App. I have 6 years of experienced on mobile application. (Android & iphone /ipad ) and App admimn with development web services where admin can manage the app from backend. I would approach your project by starting with wire frames and getting the design completed, before starting the actual development phase. I have developed the Grocery App ,Taxi and Delivery Combined App, Pharmacy App ,Doctor App ,Dating app instagram App ,Restaurant app, Buy& Sell business app, healthcare, social app, chat app, real estate app, eCommerce app, dictionary app, etc... I'm interested in working with you. I am available almost the whole day for discussion. Looking forward for your Response. Thanks Kedar
$8 CAD in 40 days
4.7 (3 reviews)
4.6
4.6
User Avatar
Hello I am professional software engineer with specialisation in developing programs and web systems I have 4 years experience in developing such programs I did my MSSE from NUST Islamabad Please open message box for me so we can discuss the details Thank you
$12 CAD in 48 days
5.0 (6 reviews)
4.0
4.0
User Avatar
Greetings Sir, I am Muhammad Faisal and i am a professional Java Developer having almost 5 years of experience and we provide you quality work within your time and budget so, let's get started :) Thanks
$15 CAD in 40 days
5.0 (24 reviews)
4.0
4.0
User Avatar
Hi Client I have good experiences for JAVA coding. I have read your all description carefully and I understand your requirement. So I think I can deliver you good result. Thanks
$15 CAD in 40 days
5.0 (2 reviews)
2.6
2.6
User Avatar
Hello, how are you? I hope you are doing well. I am an expert developer for over 6 years, I can finish this for you fast and with good performance, Contact me to start. Good luck
$15 CAD in 40 days
5.0 (2 reviews)
2.5
2.5
User Avatar
Hi. How are you. I am a java expert. Please ping me so that we can discuss in detail. Thanks and Regards.
$10 CAD in 40 days
5.0 (1 review)
1.6
1.6
User Avatar
* We are an expert developer team that are new to freelancer.com so we offer special discount to increase our profile rank * We have professional developers that can deliver you high quality source code exactly matched to your criteria definitions.
$8 CAD in 44 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi! I am Professional Developer. I have experience more then 2 years. I worked 50+ projects and completed successfully. I am currently working in Java. I can solve your problem. I will work and will give you exact result you want. I will prove myself in my work. You will not regret to hire me. Lets start working. I will wait for your positive response. Thanks!
$8 CAD in 40 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello, I've checked your project details and i can do it for you! I'm proficient in java and you'll be happy with my code
$15 CAD in 40 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of JAMAICA
Portmore, Jamaica
0.0
0
Member since May 15, 2018

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.