Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Topic: Searching on String Program Programming Code: Java Introduction Paul and Prue have asked Noel and Sandy to help them sort their list of Technical

Topic: Searching on String Program

Programming Code: Java

Introduction

Paul and Prue have asked Noel and Sandy to help them sort their list of Technical Challenges into Alphabetical Order. As we saw in class, the Radix sort is a O(n) algorithm for sorting numbers. This sort can be extended to strings with a little bit of work.

The list of words may:

  • contain more than 20 characters, but you can ignore any characters past the 20th for sorting, but must display the whole word after sorting
  • be converted to lowercase and left in lowercase (i.e. not need to convert back to the original case after sorting)
  • contain only letters and spaces (no numbers or other special characters)

Assignment Description

The program will need to perform the following tasks:

  • Display your name and email address as the first output
  • Display the following under your name: I certify that this is my own work
  • Load a list of words from a file
  • Create the needed buckets, each bucket being a Collection object. (Make sure you choose carefully, and explain why you chose the Collection object you did in the comments)
  • Process the words using the Radix sort algorithm from the book as a guide, you will need to modify the algorithm to account for words of differing lengths
  • Display the result of each iteration of your Radix algorithm
  • Be careful when choosing your Collection objects, some dont guarantee to maintain the order that items are added to them

Sample Run

Iterating on index: 19

chocolate babka coconut macaroons iced buns

matcha mill crepe cake jam and custard doughnuts rainbow coloured bagel

Iterating on index: 18

chocolate babka coconut macaroons iced buns

rainbow coloured bagel matcha mill crepe cake jam and custard doughnuts

Iterating on index: 17

chocolate babka coconut macaroons iced buns

matcha mill crepe cake rainbow coloured bagel jam and custard doughnuts

Iterating on index: 16

chocolate babka iced buns

rainbow coloured bagel jam and custard doughnuts matcha mill crepe cake coconut macaroons

Iterating on index: 15

chocolate babka iced buns

jam and custard doughnuts rainbow coloured bagel coconut macaroons matcha mill crepe cake

Iterating on index: 14

iced buns chocolate babka

jam and custard doughnuts

rainbow coloured bagel matcha mill crepe cake coconut macaroons

Iterating on index: 13

iced buns chocolate babka coconut macaroons

jam and custard doughnuts rainbow coloured bagel matcha mill crepe cake

Iterating on index: 12

iced buns

jam and custard doughnuts chocolate babka

matcha mill crepe cake coconut macaroons rainbow coloured bagel

Iterating on index: 11

iced buns

matcha mill crepe cake chocolate babka coconut macaroons rainbow coloured bagel

jam and custard doughnuts

Iterating on index: 10

iced buns chocolate babka coconut macaroons

matcha mill crepe cake rainbow coloured bagel jam and custard doughnuts

Iterating on index: 9

iced buns chocolate babka coconut macaroons

matcha mill crepe cake rainbow coloured bagel jam and custard doughnuts

Iterating on index: 8

rainbow coloured bagel jam and custard doughnuts chocolate babka

matcha mill crepe cake coconut macaroons iced buns

Iterating on index: 7

rainbow coloured bagel jam and custard doughnuts coconut macaroons matcha mill crepe cake iced buns

chocolate babka

Iterating on index: 6

matcha mill crepe cake chocolate babka

jam and custard doughnuts coconut macaroons

iced buns

rainbow coloured bagel

Iterating on index: 5

matcha mill crepe cake iced buns

chocolate babka

jam and custard doughnuts rainbow coloured bagel coconut macaroons

Iterating on index: 4

iced buns

jam and custard doughnuts rainbow coloured bagel matcha mill crepe cake coconut macaroons chocolate babka

Iterating on index: 3

jam and custard doughnuts matcha mill crepe cake chocolate babka

iced buns

rainbow coloured bagel coconut macaroons

Iterating on index: 2

coconut macaroons iced buns

rainbow coloured bagel jam and custard doughnuts chocolate babka

matcha mill crepe cake

Iterating on index: 1

rainbow coloured bagel jam and custard doughnuts matcha mill crepe cake iced buns

chocolate babka coconut macaroons

Iterating on index: 0

chocolate babka coconut macaroons iced buns

jam and custard doughnuts matcha mill crepe cake rainbow coloured bagel

Done...

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_2

Step: 3

blur-text-image_step3

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