Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is written in Java and we need to use the radix sort in order to solve the problem. words.txt Jam and Custard Doughnuts Matcha

This is written in Java and we need to use the radix sort in order to solve the problem.

words.txt

 Jam and Custard Doughnuts Matcha Mill Crepe Cake Chocolate Babka Rainbow Coloured Bagel Coconut Macaroons Iced Buns

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

CSC 420 - Assignment #3 - O(N) Searching on String 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 don't guarantee to maintain the order that items are added to them Rubric Task Unit Code Compiles Code Structure Comments Created 27 buckets Explained why the Collection object was chosen in a comment Displayed the results of each iteration Successfully sorted the words using a modified Radix algorithm Points 30% 15% 15% 10% 10% 10% 10% Sample Run Submitted by James Tucker - jtucker@csp.edu I certify that this is my own work 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... CSC 420 - Assignment #3 - O(N) Searching on String 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 don't guarantee to maintain the order that items are added to them Rubric Task Unit Code Compiles Code Structure Comments Created 27 buckets Explained why the Collection object was chosen in a comment Displayed the results of each iteration Successfully sorted the words using a modified Radix algorithm Points 30% 15% 15% 10% 10% 10% 10% Sample Run Submitted by James Tucker - jtucker@csp.edu I certify that this is my own work 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_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

MFDBS 89 2nd Symposium On Mathematical Fundamentals Of Database Systems Visegrad Hungary June 26 30 1989 Proceedings

Authors: Janos Demetrovics ,Bernhard Thalheim

1989th Edition

3540512519, 978-3540512516

More Books

Students also viewed these Databases questions