Create a tool class that implements measurable interface

Assignment Help Basic Computer Science
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.

Reference no: EM131168387

Questions Cloud

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.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What are the basic concepts of circuit switching

What are the basic concepts of circuit switching?What are the advantages and disadvantages of circuit switching?

  Discuss some secure coding efforts and practices

Describe some of the common vulnerabilities to utility companies with a virus such as Stuxnet. Discuss some secure coding efforts and practices under way to mitigate the vulnerabilities exposed by this particular episode.

  It architecture or enterprise architecture on information

Ascertain the importance of information management for the company or industry that you have chosen.Analyze the fundamental impact of IT architecture or enterprise architecture on information management for your chosen company or industry. Determine ..

  What pattern is evident

The linear version performs N iterations. What pattern is evident? Can you give a combinatoric explanation of this phenomenon?

  Create a console-based application

create a console-based application whose Main() method accepts ten integer values from the user and stores them in an array. Next, create a method that determines and displays the smallest and largest of the ten values

  Determine the radius of the friction circle

If the piston is moving downwards, and the coefficient of static friction at the contact points is µs = 0.2, determine the radius of the friction circle at each connection.

  Draw the project network diagram represented

Draw the project network diagram represented by the following situation:

  Which service to select to achieve operational excellence

Consider not only costs but also such issues as delivery speed, pickup schedules, drop-off locations, tracking ability, and ease of use of the website. Which service did you select? Explain why.

  Write a program with a loop and indexed addressing

The array elements are doublewords, sequenced in nondecreasing order. So, for example, the array {0, 2, 5, 9, and 10} has gaps of 2, 3, 4, and 1, whose sum equals 10.

  Handling the exception tl

Consider the function fun g(l) = hd(l) : : tl(l) handle Hd => nil; that behaves like the identity function on lists. The result of evaluating g(nil) is nil. Explain why. What makes the function g return properly without handling the exception Tl?

  Question regarding the java programming

Discuss GUI components, explain how to handle key and mouse events, and state how they relate to GUI programming in Java. What are the advantages of using an applet over a GUI?

  Write a java program recursively and iteratively

write a java program recursively and iteratively that reads an integer of up to five digits. Write it out individually in both forward and backward order.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd