Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Fugitive on the Run A fugitive has escaped the Oracle detention facility and authorities are currently on a manhunt for Ja Va. After escaping police

Fugitive on the Run

A fugitive has escaped the Oracle detention facility and authorities are currently on a manhunt for Ja Va. After escaping police custody he acquired a credit card and made several purchases to help him blend in and hide from the authorities.

Citizens are warned that he is armed and extremely dangerous.

The only clues to his whereabouts are the records of credit card purchases from 3 stores that he visited. If the credit card number can be determined, then a sweep can be conducted to catch the criminal!

Your program is required to search through the 3 files to find a credit card number used at all three stores, then output what that number is.

You may follow the rough pseudo code below. Note that it is incomplete and you may be required to interpret missing parts. Be sure to properly document and comment your code.

Main Method:

declare and initialize a Boolean variable match to false read a credit card number from the file while match is false, and the credit card number is not null pass the credit card number to the method that processes the second store, if it returns true then set match to true, otherwise repeat from (b) if match is true or the credit card number is null then finish the program. Depending on the value of match, output the matching result or indicate no match found.

Process 2nd store:

declare and initialize a Boolean variable match to false read a credit card number from the file while match is false and the credit card number is not null pass the credit card number to the method that processes the third store, if it returns true and the credit card number from the first store matches the second store then set match to true, otherwise repeat from (b) if match is true or the read credit card number is null then finish the method and return match

3rd Store:

eclare and initialize a Boolean variable match to false read a credit card number from the file while match is false and the credit card number is not null if the read credit card number matches the passed-in credit card number then set match to true and end the loop, otherwise repeat from (b) if match is true or the read credit card number is null then finish the method and return match

Exceed the Expectations:

Continue searching to see if any other credit card numbers are in all 3 files! Scrap the pseudocode above and implement your own linear search algorithm! Include a developer's report with a description of your algorithm and its implementation.

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions