Please help me on all the questions !!!!!!!! Really need help! Will give a thumb up for helping.
True/False (11)
Chapter 12 - Lists
The ADT list only works for entries that are strings.
The ADT list is more general than common lists and has entries that are objects of the same
type.
Adding entries to the end of a list does not change the positions of entries already in the list.
The first entry is a list is at position 0.
The entries of a list are numbered from 0 to n.
When a programmer implements an ADT list, clients can use the ADT’s operations in a program
without knowing how the programmer implemented the list to be able to use it.
The Java Class Library contains an implementation of the ADT list that uses a resizable array
instead of a linked chain.
The Java Class Library implementation of the interface list return null when an index is out of
range.
A list is an object whose data consists of unordered entries.
Each entry is a list ADT is uniquely identified by its position within the list.
You may replace an entry at any given position in a list.
The ADT list only works for entries that are strings. [ F ]
The ADT list is more general than common lists and has entries that are objects of the same
type. [ T ]
Adding entries to the end of a list does not change the positions of entries already in the list. [ T ]
The first entry is a list is at position 0. [ T ]
The entries of a list are numbered from 0 to n. [ T ]
When a programmer implements an ADT list, clients can use the ADT’s operations in a program
without knowing how the programmer implemented the list to be able to use it. [ T ]
The Java Class Library contains an implementation of the ADT list that uses a resizable array
instead of a linked chain. [ T ]
The Java Class Library implementation of the interface list return null when an index is out of
range. [ F]
A list is an object whose data consists of unordered entries. [ T ]
Each entry is a list ADT is uniquely identified by its position within the list. [ T ]
You may replace an entry at any given position in a list [ T ]
Please help me on all the questions !!!!!!!! Really need help! Will give a thumb up...
Please help me on all the questions !!!!!!!! Really need help! Will give a thumb up for helping. True/False (13) Chapter 14 - A List Implementation that Links Data Adding a node to an empty chain is the same as adding a node to the beginning of a chain. Adding a node at the end of a chain of n nodes is the same as adding a node at position n. You need a temporary variable to reference nodes as...
Please help me on all the questions !!!!!!!! Really need help! Will give a thumb up for helping. Short Answer (6) Explain why a public method should be declared to be final if it is called by a constructor. In the linked implementation of a list, why shouldn’t the constructor call the method clear even though they do the same exact assignment statements? Outline the basic steps to add a node to the end of a linked implementation of a...
10.3 Example. When you first declare a new list, it is empty and its length is zero. If you add three objects—a, b, and c—one at a time and in the order given, to the end of the list, the list will appear as a b c The object a is first, at position 1, b is at position 2, and c is last at position 3.1 To save space here, we will sometimes write a list’s contents on one...
Please write a c++ header file, class implementation file and
main file that does all of the following and meets the requirements
listed below. Also include a Output of your code as to show that
your program works and functions properly.
EXERCISING A DOUBLY-LINKED LIST CLASS
This project consists of two parts, the second of which appears
below. For the first part, write a class that
implements an unordered list abstract data type
using a doubly-linked list with pointers to...
Need a help with this one FoodListInterface.java specifies a Java interface for an ADT that maintains a list of foods, dishes or meals. This interface includes two operations: add(String food) – add the name of a food, dish or meal to the list onTheMenu(String food) – check if a given food item is on the list Develop three implementations of this interface, each with a different underlying data structure: Array Linked list ArrayList from the java.util package (a Java Collections...
Write a Java program to work with a generic list ADT using a fixed size array, not ArrayList. Create the interface ListInterface with the following methods a) add(newEntry): Adds a new entry to the end of the list. b) add(newPosition, newEntry): Adds a new entry to the list at a given position. c) remove(givenPosition): Removes the entry at a given position from the list. d) clear( ): Removes all entries from the list . e) replace(givenPosition, newEntry): Replaces the entry...
Please help with this Java Program. Thank you! we will be implementing an Ordered List ADT. Our goal is to implement the interface that is provided for this ADT. Notice that there are two interfaces: OrderedListADT builds on ListADT. In this homework, you'll only be responsible for the OrderedListADT. Figure 1: UML Overview 1 Requirements Create a doubly linked implementation of the OrderedListADT interface. Note that the book includes most of the source code for a singly linked implementation of...
I need help with the Implementation of an Ordered List (Template Files) public interface OrderedStructure { public abstract int size(); public abstract boolean add( Comparable obj ) throws IllegalArgumentException; public abstract Object get( int pos ) throws IndexOutOfBoundsException; public abstract void remove( int pos ) throws IndexOutOfBoundsException; public abstract void merge( OrderedList other ); } import java.util.NoSuchElementException; public class OrderedList implements OrderedStructure { // Implementation of the doubly linked nodes (nested-class) private static class Node { private Comparable value; private...
Homework #1 – Implementing Set with a Linked List Project Objectives 1. Be able to integrate the knowledge of Java Generics, Collection Framework and the Linked List data structure to implement the Set ADT. Components emphasized are: • Allowing parameterized type for handling a general class of values in the collection framework; • Understanding conceptual differences between lists and sets and implementing them with methods; • Implementation of an iterator with functionality that is appropriate for the collection, namely the...
Can some please help me to answer these two questions. Write a program in Java create a class diagram fragment with two classes: User and Patient. Patient is a sub-class of User. User has a method getName(), which is both over-loaded and over-ridden in the subclass In Java write an abstract class called User. User has one abstract method called authenticate, which takes two string parameters. Write a concrete sub-class of User called Administrator with an implementation of the authenticate...