Question: A trip is characterized by start date, end date, start location, short description and price. In main method add 3 trips to a LinkedList, then
A trip is characterized by start date, end date, start location, short description and price. In main method add 3 trips to a LinkedList, then add them to a HashSet (duplicate trips should be removed automatically) then add them to a TreeSet. Implement class Trip (with all required methods!) and main method.
Implement a TripRepository class that manages a collection of trips. Class should have methods for adding new trips, getting a trip (or a trip collection) by start date or location. Implement a method that returns a trip/trip collection based on more than one field. Also implement TripRepositoryI interface that exposes the methods in TripRepository.
Implement an Agency thread that continuously adds trips in an Offer and a Client thread that continuously removes trips from the Offer and outputs their price. Use producer-consumer pattern with wait/notify. Do not use explicit locks or blocking queues or other concurrent collections.
I need it in Java in 1h 30 min max.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
