Reference no: EM131168387
1) General Description
In this assignment you will create a new class called "XLinkedList". This class defines an inner (private) class "Node"as the container for the "T obj" data. The main idea is to recode the normal methods of a linked list to recursive ones.
2) Data and Methods of XLinkedList:
1) Data: class Node<T>, Node<T> head & int size.
2) Methods:
a) Default constructor: sets all data members to initial values.
b) Boolean search(T obj): a recursive method that searches the linkedlist for a passed obj and returns a true or a false if the objwas/not found.
c) double sum(): a recursive method that computes the summation of the linkedlist.
d) void clear(): a recursive method that clears the entire linkedlist. Do not use the short code: "head = null;".
e) void printLeft():a recursive method that prints all objs in the linkedlist left to right.
f) void printRight():a recursive method that prints all objs in the linkedlist right to left.
3) Add a new interface "Measurable" with these methods:
a) public double measure();
4) Create a "Tool" class that implements "Measurable" interface.
The "Tool" class models a physical tool such as: hammer, screw driver, chisel, brush, etc. Tool class should define at least the following:
a) Data members: name, id, price, purchaseDate and location (as a vector of three int entries: aisle, row, column)
b) Methods: default constructor, rand, print, toString and list. These methods are explained as follows:
- default constructor: sets all data members to values of your choice but need to be justified.
- rand: randomly generates an instance of Tool by setting all data members to random values. (more details/demo in class).
- print: displays all data members of a Tool object in one line
- toString: returns a string containing exactly the same info displayed by print().
- list: creates and returns a "ArrayList" of Tool objects.
5) Add a Driver/Demo/Test class to test ALL methods of XLinkedList.
6) Fill XLinkedList with at least 16 objs.
7) Test your project and screen-capture your sample testing to be sent along with the project.
I need a good explanation for each part of the assignment.
Industrial applications of electrical engineering technology
: 1. What are some industrial applications of Electrical Engineering Technology? 2. Can Scratch program can be used as tool to prototype ideas in software applications? 3. Is SuperConductivity when we have temperatures near some very low temperatures?
|
Write a paper on introduction of african-american literature
: Write a paper about introductory African-American literature courses. Though the authors of the texts on this syllabus have well-established places in the history of African-American letters, this course focuses on dynamic and brilliantly crafted t..
|
Calculate the rate of return for the portfolio
: Calculate the rate of return for the portfolio - Which Investment type has the highest earnings rate? - What percentage of the portfolio (in $) are CD's?
|
Industrial applications of electrical engineering technology
: 1. What are some industrial applications of Electrical Engineering Technology? 2. Can Scratch program can be used as tool to prototype ideas in software applications? 3. Is SuperConductivity when we have temperatures near some very low temperatures?
|
Create a tool class that implements measurable interface
: Recursive method that computes the summation of the linkedlist - Create a "Tool" class that implements "Measurable" interface.
|
What might the artwork look like
: Imagine that you are serving on a committee to select an artist who will create a memorial to the military personnel who have died in the Iraq war. What might the artwork look like
|
Implement for traffic flowing into the dmz
: Question 1: Analyze the IT infrastructure assets that are commonly located in the DMZ. Determine how the types and size of the organization impact the structure of the DMZ. Question 2:Propose at least three policies that organizations need to imp..
|
Critical success factors of enterprise systems
: These 9-10 pages essay (APA) is a synthesis paper on critical success factors for ERP implementations. For this assignment, the general topic (ERP system) has been provided to you - critical success factors of enterprise systems implementations. Y..
|
Determine the number of heads that come up
: Given a positive integer n, simulate n repeated flips of a biased coin with probability p of heads and determine the number of heads that come up. Display the cumulative results.
|