Find Jobs
Hire Freelancers

Hotel Booking Information

$8-15 CAD / hour

Avslutat
Publicerad över två år sedan

$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

Om projektet

14 anbud
Distansprojekt
Senaste aktivitet två år sedan

Ute efter att tjäna lite pengar?

Fördelar med att lägga anbud hos Freelancer

Ange budget och tidsram
Få betalt för ditt arbete
Beskriv ditt förslag
Det är gratis att registrera sig och att lägga anbud på uppdrag
14 frilansar lägger i genomsnitt anbud på $12 CAD/timme för detta uppdrag
Använd 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 Om 40 dagar
4,9 (165 omdömen)
6,6
6,6
Använd 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 Om 40 dagar
4,7 (3 omdömen)
4,6
4,6
Använd 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 Om 48 dagar
5,0 (6 omdömen)
4,0
4,0
Använd 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 Om 40 dagar
5,0 (24 omdömen)
4,0
4,0
Använd 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 Om 40 dagar
5,0 (2 omdömen)
2,6
2,6
Använd 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 Om 40 dagar
5,0 (2 omdömen)
2,5
2,5
Använd 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 Om 40 dagar
5,0 (1 omdöme)
1,6
1,6
Använd 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 Om 44 dagar
0,0 (0 omdömen)
0,0
0,0
Använd 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 Om 40 dagar
0,0 (0 omdömen)
0,0
0,0
Använd 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 Om 40 dagar
0,0 (0 omdömen)
0,0
0,0

Om kunden

Flagga för JAMAICA
Portmore, Jamaica
0,0
0
Medlem sedan maj 15, 2018

Kundverifikation

Tack! Vi har skickat en länk för aktivering av gratis kredit.
Något gick fel med ditt e-postmeddelande. Vänligen försök igen.
Registrerade Användare Totalt antal jobb publicerade
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Laddar förhandsgranskning
Tillstånd beviljat för geolokalisering.
Din inloggningssession har löpt ut och du har blivit utloggad. Logga in igen.