data structure ''IntArrayBag''+linked list implementation +A decision tree+graphical user interface
$30-5000 USD
In Progress
Posted almost 19 years ago
$30-5000 USD
Paid on delivery
**Task 1 An AWT in Java (10 marks)**
Create an abstract data structure called IntArrayBag, closely following the B242 lecture
notes and specification given for the said data type.
Create a test program that will test your IntArrayBag properly and according to the
discussion conducted in the lectures.
Properly comment your program with Javadoc comments and generate associated
Javadoc HTML files.
**Task 2 A linked list implementation (10 marks)**
Create a program that will generate a linked list of objects in Java. Your program must
allow for the creation, deletion of the list, insertion and deletion of elements in the list.
A program that will allow the testing of your linked list implementation must be created.
Your code must me again properly documented as to produce Javadoc HTML pages.
**Task 3 A decision tree (50 marks)**
**Task 3a.**
Write the core of a Java program that plays a guessing game, which uses a binary tree
that stores information about a collection of places. Each leaf in the binary tree contains
the name of a monument/attraction/museum etc and each non-leaf node contains a
question about the place. You start at the root and ask the question that is written there. If
the answer is “Yes??, you move to the left child, and if the answer is “No??, you move to
the right child. Eventually, you will reach a leaf, and the name at the leaf tells you the
place you have been guessing ??" or at least it does if the place is one of the places the tree
knows about. If it isn’t, then the program could ask the player to enter a question, which
will help to distinguish the place he/she was thinking about from the one that is currently
in the leaf node. As you keep playing, your tree grows and you end up with a large binary
tree.
See attached file please
## Deliverables
**Task 1 An AWT in Java (10 marks)**
Create an abstract data structure called IntArrayBag, closely following the B242 lecture
notes and specification given for the said data type.
Create a test program that will test your IntArrayBag properly and according to the
discussion conducted in the lectures.
Properly comment your program with Javadoc comments and generate associated
Javadoc HTML files.
**Task 2 A linked list implementation (10 marks)**
Create a program that will generate a linked list of objects in Java. Your program must
allow for the creation, deletion of the list, insertion and deletion of elements in the list.
A program that will allow the testing of your linked list implementation must be created.
Your code must me again properly documented as to produce Javadoc HTML pages.
**Task 3 A decision tree (50 marks)**
**Task 3a.**
Write the core of a Java program that plays a guessing game, which uses a binary tree
that stores information about a collection of places. Each leaf in the binary tree contains
the name of a monument/attraction/museum etc and each non-leaf node contains a
question about the place. You start at the root and ask the question that is written there. If
the answer is “Yes??, you move to the left child, and if the answer is “No??, you move to
the right child. Eventually, you will reach a leaf, and the name at the leaf tells you the
place you have been guessing ??" or at least it does if the place is one of the places the tree
knows about. If it isn’t, then the program could ask the player to enter a question, which
will help to distinguish the place he/she was thinking about from the one that is currently
in the leaf node. As you keep playing, your tree grows and you end up with a large binary
tree.
Additionally, your initial knowledge tree can be obtained by reading information from a
file. When the program ends, the knowledge tree at that point is written to the same file.
**Task 3b.**
The program should be bound with a graphical user interface that will allow the user /
player to view the tree unfold as the game is being played. The nodes and the leaf nodes
should be clearly drawn and lines connecting the nodes should be generated.
The program should be able to accommodate trees that extend further than the available
space on the screen.**This will carry additional marks.**
**Again you must produce proper documentation for your program, so that javadoc**
**HTML files can be created and produced with this work.**
**You DO NOT have to produce a logbook for this assignment.**
Your report should include,
Printouts of your programs
A printout of any test data, and clear mention of your reasons for choosing the particular
test data.
Printouts of screen captures showing the graphical user interface for Task3.
The report should also include an electronic version of your code in un-compiled form,
along with particular instructions of how to compile it.
Pre-compiled versions may be included but in a different directory.
## Platform
Windows XP,Linux