Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help to Write a Program in Java Consider an application that logs transactions. The log includes the location where a transaction originated and the

please help to Write a Program in Java

Consider an application that logs transactions. The log includes the location where a transaction originated and the time the transaction occurred and this information is stored such that they are ordered by the time of the transaction (see sample input below). You are required to sort this log by location while preserving the order of the time field (see sample output below). Implement an algorithm of your choice to sort this array based on the location while preserving the order of the time field. Test your algorithm with the input file provided in Canvas named NovelSortInput.txt. Explain in your report why the sorting algorithm you chose is the best for the job.

Input file

Chicago 09:00:00

Phoenix 09:00:03

Houston 09:00:13

Chicago 09:00:59

Houston 09:01:10

Chicago 09:03:13

Seattle 09:10:11

Seattle 09:10:25

Phoenix 09:14:25

Chicago 09:19:32

Chicago 09:19:46

Chicago 09:21:05

Seattle 09:22:43

Seattle 09:22:54

Chicago 09:25:52

Chicago 09:36:14

Phoenix 09:37:44

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions