Unformatted Attachment Preview
Assignment Description
There are many additional algorithms available for searching and sorting data structures. The
searching and sorting algorithms that are typically used work best for particular data structures.
For this assignment, you will examine 2 searching algorithms and 2 sorting algorithms and the
associated data structures.
Choose 2 sorting algorithms and 2 searching algorithms, and describe them in detail, including
the type of data structures they work well with. Complete the following:
•
•
•
•
For 1 of the selected search algorithms, write pseudocode, and create a flowchart to show
how the algorithm could be implemented to search data in the data structure.
For 1 of the selected sort algorithms, write pseudocode, and create a flowchart to show
how the algorithm could be implemented to sort data in the data structure.
Give the pseudocode and flowchart that would show how one of the additional data
structures could be implemented to search data.
In addition, create a flowchart to show how to sort using one of the additional algorithms.
o Give the pseudocode for the flowchart as well.
Please submit the following for your assignment in a single MS Word document:
•
•
2 flowcharts (1 for a searching algorithm and 1 for a sorting algorithm)
2 pseudocode examples (1 for a searching algorithm and 1 for a sorting algorithm)
Note: Diagrams created in separate programs should be copied and pasted into your document
for submission.
Please submit your assignment.
Assignment Description
Arrays are one of the basic data structures used in most programming languages. For this
assignment, you will explore the use of arrays. Complete the following:
•
•
•
•
Describe how arrays are implemented in Java.
Provide Java code to illustrate how to create an array, reference an array, and address an
element of an array.
Create a flowchart, and provide the corresponding pseudocode to show how to sort an
array using the bubble sort.
Create a flowchart, and provide the corresponding pseudocode to show how to search an
array for a specified value using the sequential search algorithm.
Please submit your assignment in a single MS Word document:
Note: Diagrams created in separate programs should be copied and pasted into your document
for submission.
Please submit your assignment.
For assistance with your assignment, please use your text, Web resources, and all course
materials.
Assignment Description
Basic data structures such as arrays are not sufficient for some applications. In some cases, more
advanced data structures are more suitable. In this assignment you will examine Stacks and
Queues using linked lists. Complete the following:
•
•
•
Create a flowchart to represent the Push and Pop operations for a Stack based on a linked
list data structure.
Create a flowchart to represent the Enqueue and Dequeue operations for a Queue based
on a linked list data structure.
Write the required Java code to implement either a Stack or a Queue data structure based
on a linked list. The code should include the class constructors, the necessary properties,
and methods to add and remove elements from the data structure. Do not use the built-in
Java Stack class or the built-in Java Queue interface or the built-in Java linked list (you
should create your own code for these classes).
Please submit your assignment in a single MS Word document:
Note: Diagrams created in separate programs should be copied and pasted into your document
for submission.
Please submit your assignment.
Assignment Description
One of the fundamental requirements of programs is to use data stored in permanent storage such
as a hard disk file. Programs must be able to read and write this type of data and use appropriate
data structures within the program to work with the data. In this assignment, you will write a
program to load and manipulate a data file. The data file can be downloaded from the following
link: Unit 4 Sample Data.
The file should not be a comma delimited file and should have the following record structure:
•
•
•
•
•
•
•
•
•
•
•
•
FirstName – Character – Size (12)
LastName – Character – Size (16)
Company – Character – Size (32)
Address – Character – Size (32)
City – Character – Size (24)
County – Character – Size (24)
State – Character – Size (2)
ZIP – Number – Size (5)
Phone – Character – Size (12)
Fax – Character – Size (12)
Email – Character – Size (32)
Web – Character – Size (42)
Step 1: For this assignment, you will write a complete Java console program to load the data file
into an ArrayList data structure. Store each line from the file as a separate record in the
ArrayList. To read the file, you should use a FileReader wrapped in a BufferedReader. If you
create a Java class to contain each record, you will be able to create an object for each record and
store the object in the ArrayList. Sorting the data can then be done using another wrapper class
that contains the ArrayList and has methods for sorting and output of the data.
Step 2: After the file is loaded into the ArrayList, sort the data in ascending order based on the
LastName field, and display the following fields:
•
•
•
First name
Last name
Company
Step 3: Next, sort the data in descending order based on the ZIP field, and display the following
fields:
•
•
•
•
First name
Last name
Company
ZIP
Step 4: Display all of the records (and all of the fields) for everyone that is in the state "NY."
Step 5: The submission should be a single MS Word document with the program source code for
the solution and screenshots of the output for the following list:
1. Sorted data based on last name
2. Sorted data based on ZIP
3. Everyone in the state of NY
Please submit your assignment.
For assistance with your assignment, please use your text, Web resources, and all course
materials.
Assignment Description
One of the challenges in programs is to store data in a structure that allows fast and efficient
searching. Hash tables provide this type of performance by storing data in buckets based on a
value called a hash key. The bucket containing a specific data entry is identified by a hash key,
which is generated by a hash function. Finding a data entry is then a simple matter of taking a
hash key, determining which hash table bucket contains that key value, and then sequentially
searching a relatively small linked list in the appropriate hash table bucket. Think of the entire
hash table as a list full of small linked lists that are each identified by a value calculated by a
hash function that takes a key value as input and returns a bucket identifier.
For this assignment, you will complete the following:
•
•
•
•
Create a flowchart to demonstrate the operation of a hash structure. This flowchart should
include operations to insert and remove entries in the hash structure.
Create a flowchart to demonstrate the operation of the hash function (the hash key
generator).
Write a complete Java program to implement a hash table data structure for String data.
o Your program should demonstrate insertion and removal of data.
o A linked list must be used in the hash buckets to resolve duplicate data collisions.
o Note: You may not use the Java HashTable or HashMap or other similar built-in
Java data structures for your solution. The intention of this assignment is for you
to demonstrate your ability to write the code for your own hash table
functionality.
Submit your flowcharts and Java source code in a single MS Word document for grading.
This assignment will also be assessed using additional criteria provided here.
Please submit your assignment.