Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 The code bundle While this unit's code bundle is quite large, much of it should already be familiar to you. The code bundle contains

image text in transcribed

1 The code bundle While this unit's code bundle is quite large, much of it should already be familiar to you. The code bundle contains three packages (not including test packages). The arrayGenerator and scope packages come from unit 8's code bundle', and provide tools for generating random arrays. These tools are used in the tester classes, but not in the implementing classes. The remaining package, graph, is where you will be doing most of the work for this unit. A large part of this unit's graph package is identical to unit 14's graph packages. It contains the same Graph interface, with an implementation of this, using adjacency lists in AdjacencyGraph. The Traversal interface from unit 14 is also present, but this time unit 14's model answer, BreadthFirstTraversal, has also been included in the package? Section 2 describes the remainder of the graph package, and explains what you need to do for this unit's exercises. Unit 8 was the "sorting" unit. 2There is a minor addition to the array generator class as implemented in the unit 8 code bundle. In this unit's code bundle ArrayGenerators must also implement a getNoDuplicatesArray method, which must work just like the getArray method already in- cluded in unit 8's code bundle, except that the generated array must not contain any duplicate values. This method is also implemented for all of ArrayGenerators provided. A tester class for this has also been provided, in BreadthFirstTraversaltest. 1 CIS2344 Algorithms, Processes, and Data Hugh Osborne 2 Exercises This unit's exercises are all about implementing topological sorts. The TopologicalSort interface specifies the getSort method that all topological sorts must imple- ment. "Stub" implementations of a depth first topological sort, and of a ref- erence counting topological sort are also provided, in DepthFirstSort and ReferenceCountSort respectively. The exercises for this unit are: Model exercise Complete the implementation of a depth first topological sort in the DepthFirstSort class. The getSort() method should return a List (T), containing a topological sort of the nodes in the graph. Logbook exercise Complete the implementation of a reference count- ing topological sort in the referenceCount Sort class. The getSort() method should return a List (T), containing a topological sort of the nodes in the graph. 3 Tests Tests are provided both for the unit 14 exercises (in DepthFirstTraversaltest and BreadthFirst TraversalTest), and for this unit's exercises (in DepthFirstSortTest and ReferenceCountSortTest). These tests are again deliberately largely un- documented. You should have a look at these tests and try to understand them. You should also be thinking about whether anything should be added to the test suite. 1 The code bundle While this unit's code bundle is quite large, much of it should already be familiar to you. The code bundle contains three packages (not including test packages). The arrayGenerator and scope packages come from unit 8's code bundle', and provide tools for generating random arrays. These tools are used in the tester classes, but not in the implementing classes. The remaining package, graph, is where you will be doing most of the work for this unit. A large part of this unit's graph package is identical to unit 14's graph packages. It contains the same Graph interface, with an implementation of this, using adjacency lists in AdjacencyGraph. The Traversal interface from unit 14 is also present, but this time unit 14's model answer, BreadthFirstTraversal, has also been included in the package? Section 2 describes the remainder of the graph package, and explains what you need to do for this unit's exercises. Unit 8 was the "sorting" unit. 2There is a minor addition to the array generator class as implemented in the unit 8 code bundle. In this unit's code bundle ArrayGenerators must also implement a getNoDuplicatesArray method, which must work just like the getArray method already in- cluded in unit 8's code bundle, except that the generated array must not contain any duplicate values. This method is also implemented for all of ArrayGenerators provided. A tester class for this has also been provided, in BreadthFirstTraversaltest. 1 CIS2344 Algorithms, Processes, and Data Hugh Osborne 2 Exercises This unit's exercises are all about implementing topological sorts. The TopologicalSort interface specifies the getSort method that all topological sorts must imple- ment. "Stub" implementations of a depth first topological sort, and of a ref- erence counting topological sort are also provided, in DepthFirstSort and ReferenceCountSort respectively. The exercises for this unit are: Model exercise Complete the implementation of a depth first topological sort in the DepthFirstSort class. The getSort() method should return a List (T), containing a topological sort of the nodes in the graph. Logbook exercise Complete the implementation of a reference count- ing topological sort in the referenceCount Sort class. The getSort() method should return a List (T), containing a topological sort of the nodes in the graph. 3 Tests Tests are provided both for the unit 14 exercises (in DepthFirstTraversaltest and BreadthFirst TraversalTest), and for this unit's exercises (in DepthFirstSortTest and ReferenceCountSortTest). These tests are again deliberately largely un- documented. You should have a look at these tests and try to understand them. You should also be thinking about whether anything should be added to the test suite

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

Recommended Textbook for

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

Discuss the key ambient conditions and their effects on customers.

Answered: 1 week ago

Question

Understand the roles of signs, symbols, and artifacts.

Answered: 1 week ago