Big Java Late Objects
Big Java Late Objects
2nd Edition
ISBN: 9781119330455
Author: Horstmann
Publisher: WILEY
Question
Book Icon
Chapter 17, Problem 2PP
Program Plan Intro

Program:

LinkedList.java:

  • Define a class “LinkedList”.
    • Define a “LinkedList()” constructor.
      • This generates an empty linked list.
    • Define a “getFirst()” method.
      • This function returns the first element in the linked list.
    • Define a “removeFirst()” method.
      • This function returns the removed element in the list.
    • Define a “addFirst()” method.
      • This function adds an element to the front of the linked list.
    • Define the “listIterator()” function.
      • This returns an iterator for iterating through this list.
    • Define a class “Node”.
      • Declare the packages for process.
    • Define a class “LinkedListIterator” which implements ListIterator.
      • Declare the local variables.
      • Define a constructor “LinkedListIterator()”.
        • This generates an iterator point to the front of list.
          • Define “next()” method.
            • This moves the iterator to next element.
            • Returns the traversed element.
          • Define a “hasNext()” function.
            • Checks if there is an element after the iterator position.
            • It returns true if there is an element.
          • Define a “add()” function.
            • This will add an element before the iterator position.
            • Then moves the iterator past to the inserted element.
          • Define a “remove()” method.
            • This function removes the last traversed element in the list.
          • Define a “set()” function.
            • This function set the last element to a different value.

ListIterator.java:

  • Define an interface “ListIterator”.
    • Declare the “next()”, “hasNext()”, “remove()” and “set()” functions.

Tree.java:

  • Define a class “Tree”.
    1. ○ Define a constructor “Tree()”.
      • It generates an empty tree.
    2. ○ Define a “addSubTree()” function.
      • This function adds an element as last child.
    3. ○ Define a “count()” method.
      • This function counts the number of leaf elements.
    4. ○ Define a “size()” method.
      • This computes the size of the tree.
      • Returns the number of non-null nodes.
    5. ○ Define a “listToString()” method.
      • This function converts list of lists as string.
    6. ○ Define a “toString()” method.
      • This function is used to convert to a string.

TreeTester.java:

  • Define a class “TreeTester”.
    • Define a “main()” function.
      • Create objects for the tree.
      • Add elements to the tree.
      • Print the tree and size of the tree.

Blurred answer
Students have asked these similar questions
(Short-answer) b. Continue from the previous question. Suppose part of the data you extracted from the data warehouse is the following.   Identify the missing values you think exist in the dataset. Use Column letter and Row number to refer to each missing value in the dataset. Please write down how you want to address each particular missing value (you can group them if they receive same treatment). For imputation, you do not need to calculate the exact imputed values but just describe what kind of value you want to use to impute.
Please original work Locate data warehousing solutions offered by IBM, Oracle, Microsoft, and Amazon Compare and contrast the capabilities of each solution and provide several names of some organizations that utilize each of these solutions. Please cite in text references and add weblinks
Need Help: Which of the following statements about confusion matrix is wrong A) Confusion matrix is a performance measure for probability prediction techniques B) Confusion matrix is derived based on classification rules with cut-off value 0.5 C) Confusion matrix is derived based on training partition to measure a model’s predictive performance D) None of the above

Chapter 17 Solutions

Big Java Late Objects

Ch. 17.2 - Prob. 11SCCh. 17.2 - Prob. 12SCCh. 17.3 - Prob. 13SCCh. 17.3 - Prob. 14SCCh. 17.3 - Prob. 15SCCh. 17.3 - Prob. 16SCCh. 17.3 - Prob. 17SCCh. 17.3 - Prob. 18SCCh. 17.4 - Prob. 19SCCh. 17.4 - Prob. 20SCCh. 17.4 - Prob. 21SCCh. 17.4 - Prob. 22SCCh. 17.4 - Prob. 23SCCh. 17.4 - Prob. 24SCCh. 17.5 - Prob. 25SCCh. 17.5 - Prob. 26SCCh. 17.5 - Prob. 27SCCh. 17.5 - Prob. 28SCCh. 17.5 - Prob. 29SCCh. 17.5 - Prob. 30SCCh. 17.6 - Prob. 31SCCh. 17.6 - Prob. 32SCCh. 17.6 - Prob. 33SCCh. 17.6 - Prob. 34SCCh. 17.6 - Prob. 35SCCh. 17.7 - Prob. 36SCCh. 17.7 - Prob. 37SCCh. 17.7 - Prob. 38SCCh. 17.7 - Prob. 39SCCh. 17.7 - Prob. 40SCCh. 17 - Prob. 1RECh. 17 - Prob. 2RECh. 17 - Prob. 3RECh. 17 - Prob. 4RECh. 17 - Prob. 5RECh. 17 - Prob. 6RECh. 17 - Prob. 7RECh. 17 - Prob. 8RECh. 17 - Prob. 9RECh. 17 - Prob. 10RECh. 17 - Prob. 11RECh. 17 - Prob. 12RECh. 17 - Prob. 13RECh. 17 - Prob. 14RECh. 17 - Prob. 16RECh. 17 - Prob. 18RECh. 17 - Prob. 19RECh. 17 - Prob. 20RECh. 17 - Prob. 21RECh. 17 - Prob. 22RECh. 17 - Prob. 23RECh. 17 - Prob. 24RECh. 17 - Prob. 25RECh. 17 - Prob. 26RECh. 17 - Prob. 27RECh. 17 - Prob. 28RECh. 17 - Prob. 1PECh. 17 - Prob. 2PECh. 17 - Prob. 3PECh. 17 - Prob. 4PECh. 17 - Prob. 5PECh. 17 - Prob. 6PECh. 17 - Prob. 7PECh. 17 - Prob. 8PECh. 17 - Prob. 9PECh. 17 - Prob. 10PECh. 17 - Prob. 11PECh. 17 - Prob. 12PECh. 17 - Prob. 13PECh. 17 - Prob. 1PPCh. 17 - Prob. 2PPCh. 17 - Prob. 3PPCh. 17 - Prob. 4PPCh. 17 - Prob. 5PPCh. 17 - Prob. 6PPCh. 17 - Prob. 7PPCh. 17 - Prob. 8PPCh. 17 - Prob. 9PPCh. 17 - Prob. 10PPCh. 17 - Prob. 11PP
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education