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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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