It is a lab exercise related with graph theory. I need this to be solved in JAVA. Here’s a small excerpt from the file:
“Cargo gets introduced to the system at any one of the nodes or sites in the system and from there will need to be carried from its source to destination. This will require the theoretical companies that own the sites to dispatch vehicles to collect the cargo. Cargo whose destination is a site that is beyond the current company’s network will have to work together with the other companies to get the cargo to its destination.”
Please check the attached doc. My budget is 15$.
2 >Shipping N etwork
In this lab we will be constructing a network of entities that will be working together to solve the problem. G roups of entities and teams are very common all kinds of fields and other examples of this type of programming problem appear quite frequently. So the example we will be working with here in this lab is that of a shipping network. C argo gets introduced to the system at any one of the nodes or sites in the system and from there will need to be carried from its source to destination. This will require the theoretical companies that own the sites to dispatch vehicles to collect the cargo. Cargo whose destination is a site that is beyond the current company’s network will have to work together with the other companies to get the cargo to its destination. The following map and accompanying tables show the shipping routes between
4 shipping companies in a specific network.
Starting location
D estination
Cost
Time
A
1 B 2 1 C
3 1. 5 1 O 9 5 6 3 A 2 1 E 1 B 4 1.25 C 6 3 E 2 2 G 1 1 F 1 .5 D 2 1.25 E 1 .5 C 3 4 L 9 4.5
H 8 2.25 D 1 1.5 Q 4 1 E 10 1 F 9 1 J 4 1 K 4 1 P 15 3 H 3 1 K 4 1 L 9 1 H 4 1 J 3 1 9 1.25 F 6 5 M 1 1 L 1 1 J 3 1 R 6 6 K 8 3 H 9 4 R 4 2 P 5 4 D 5 1.5 P 3 2 Q 3 3 O 3 2 N 5 3 G 4 1 O 3 2 P 6 4 M 6 6 N 3 2 Provided here for understanding is a sample network. Your solution needs to be able to adjust to whatever size and shape the network is and take in and handle cargo deliveries on that network. There are 4 companies shown here in this example (Black, Blue, Red, Green), but again, your solution should allow for any amount of companies as well as any number of nodes/sites in the network. A text file should be used to hold list of routes in the table shown above. Each company has a number of cargo carrying vehicles – these actually do the job of transporting the cargo. Each vehicle works for 1 of the companies may travel between the routes listed: such as A to C taking 1 hour and costing the company 2 currency units. The vehicle can then wait until there for new cargo order since the company owns the site or it may be transferred somewhere else to take another order. If a vehicle travels to a site that they do not own they may pickup any already waiting packages bound for their own company sites, but they may not wait at the site. The must move on back to there own sites to wait. – Challenge 1- The exception is company Red which allows any company vehicles to wait at their sites. If a vehicle for another company transfers cargo for that company both companies will split the cost evenly. Let’s say we get an order that starts in B, and travels to D. Company Black will make 5 currency off of the order (as the table shows). While company Black’s vehicle is in site D, it finds that there is already waiting cargo that wants to be sent to C. Company Blue (which owns D) can allow Black to carry the cargo to C (cost 6) so both companies will split 3 currency units. Again, if a company’s cargo vehicle goes to a rival company to get the cargo and return it to their site the 2 companies will share the cost. Because of this companies typically prefer to carry their own cargo, but in certain situations, it may be the best option. So to decide what to do with the cargo company Blue looks at its vehicles and if none are nearby then it will allow the Black company vehicle to take the cargo. Otherwise if there is a nearby vehicle that can take the cargo Blue will use their own vehicle (so they can get the full profit/cost of the transport). – Challenge 2 – Vehicles for companies Blue and Red can transfer a total of 3 cargos (we will ignore size of the cargo and weight for now) however Black and Green can only carry 2 cargos at a time. If a cargo is bound for a site that is beyond the companies network (say from A to H), the starting location company will transfer it to another company along the way and will leave the cargo for that company to finish the job. The company will get paid in full the portion of the trip it has completed and the other company (or companies) will get their share for the portion of the trip they contribute to. – Challenge 3- Company Blue has an agreement with company Black and Green to allow their vehicles to move through their sites but the cost of the trip is split along the routes that belong to company Blue. Cargo that waits at the starting location will incur a penalty of .5 currency every hour the cargo waits. So companies would be willing to allow a rival company to carry the cargo to keep from incurring penalties if they have no available vehicles. Companies will not have to pay if the cargo waits too long the trip will just be free – still using 1 of their vehicles for a free trip is not appealing for a company. This is the list of vehicle for the example scenario you will be completing: Company Black – 2 vehicles (A, C) We will be taking a list of cargo orders which will look like: This here is just an example. You may want to further fill out this list to more thoroughly test your solution. Alternatively, you may want to add very specific test cargo to make sure new code that you are writing works as intended. But remember, that in the end everything needs to work together. So make sure that a more comprehensive test is able to be completed. Output should show an hour by hour display of all the active cargo (currently taken in and not at its destination yet), where it is, if it is in transit, and once it reaches the destination. Additionally, a list of each vehicle should also be shown, where they are and what they are doing: Obviously, the output will be very useful for debugging our program so take some effort to make it detailed but the exact formatting/wording I will leave up to you. The program should run until there is no more active cargo and there it can exit showing the final total of currency earned by each shipping company and the cost incurred by each of the companies that sent cargo. Other information such as amount of cargo each company carried, what vehicle did the most work, traveled the most or made the most money, would all be interesting things to show at the end. Some suggested classes include class Site or location, Vehicle, Company, Route, Cargo. Do not go overboard, Company Red should NOT be a separate class from Company Blue. They have differences but those can be satisfied with variables – not unique attributes or behaviors. Do not tackle everything at once. Try to make a simple setup with cargo coming in at one site and have 2 or 3 sites that it will go between. Then slowly start to add more to it. Come up with a simple UML for the classes you decide to have, include what data is being kept by each class and what each class does. Try to make sure you are using the objects to do the work and not all the logic in main. What are the relationships between the classes? Shouldn’t a company keep track (store) their vehicles, so that they can dispatch them to cargo sites. Start early and ask questions! Also look for updates to this document. It may change and additional details may be added as you guys as questions (yes, customers in commercial settings are very well known for changing requirements, I will strive to add only things that add clarity to the document). Submission For this assignment I want you to submit all the files needed to run your scenario including the .java files and text or data files. Please indicate what your driver class is (what starts your program) by labeling it as shipping_driver_student_name. There are a vast number of requirements and details throughout the program. To ensure that your program is graded correctly comment and label exactly how and where you are completing the requirements. Specifically, there are 5 challenge objectives listed throughout the document. You probably want to save going after those until the majority of the system is either designed or working. But if you do try to complete the challenges list at the top of your document in comments your intention to complete them and where and how you are doing so (you may provide this as submission text as well). The challenges are technically bonus requirements but just trying them may make up for issues or errors elsewhere in your solution.
C
2
A
B
B
D
5
B
B
G
C
C
4
D
D
D
D
E
E
F
F
F
F
G
G
H
H
H
H
H
J
J
J
K
K
K
N
L
L
M
M
M
N
N
N
N
O
O
O
P
P
Q
Q
Q
R
R
Company Blue – 3 vehicles (E,F,G)
Company Red – 2 vehicles (H, J)
Company Green – 4 vehicles (O,N,M, P)
Time, Cargo Company Name, Cargo Description, StartingPlace, Destination.
0, BobCo, Sprockets, A, O
1, Jay Comp LLC, Widget1, C, D
1, Stuff Corp, Stuffs, F, P
2, BobCo, Paperwork, C, F
2, Blockbuster, Video Cargo, G, N
Time is the hour the order came in (do not cheat an route vehicles to a location before the cargo order comes in). If there is not vehicle in the location, then one will be dispatched by the company which owns the site (assuming there is one available). Consideration should be taking for visiting company vehicles (vehicles from a different company that are at the site). The overall job of our program is to simulate the list of all the orders and keep track of the earnings of each company, and the costs to each company listed in the order file. Companies will appreciate the program routing their cargo through the least costly routes available but if there is a cargo that needs to be picked up perhaps your vehicle may take a less efficient route. – Challenge 4- If this is done company Red and Blue will charge the full price whereas company Green and Black will charge only for the most efficient route. – Challenge 5- Other consideration for shipping may be taken such as the quickest route as opposed to the least costly. Or some companies want their goods to be transferred to the fewest other companies/vehicles, if their cargo is delicate/fragile. The file adds a tag to the order file at the end of the line: Cost, Time, Transfers.
RedVehicle1, at H, waiting for Cargo.
GreenVehicle1, between P and N, Cargo (BobCo, Sprockets), in Transit.
GreenVehicle2, between O and Q, traveling to Cargo.Hints:
We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.
Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.
Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.
Your deadline is our threshold for success and we take it very seriously. We make sure you receive your papers before your predefined time.
Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.
Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.
We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.
Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.
You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.
Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.
Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.
You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.
You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.
Join us for the best experience while seeking writing assistance in your college life. A good grade is all you need to boost up your academic excellence and we are all about it.
We create perfect papers according to the guidelines.
We seamlessly edit out errors from your papers.
We thoroughly read your final draft to identify errors.
Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!
Dedication. Quality. Commitment. Punctuality
Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.
We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.
We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.
We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.
We promise you excellent grades and academic excellence that you always longed for. Our writers stay in touch with you via email.