What does the acronym ADT stands for What is an ADT What is

What does the acronym \"ADT\" stands for? What is an ADT? What is the connection, if any, between an ADI and a data structure? Use an example to illustrate the answer to your last question. What does it mean to throw an exception? How does one express throwing an exception in Java? Give two different ways program handle errors other than throw exceptions. Give one reason to use exceptions instead of these other ways. How are exceptions useful for implementing libraries or generic ADT\'s used by different applications? Compare and contrast internal versus external iterators. What are the advantages of each? Give examples. What requirement must be established if you are going to dereference a variable? Explain how one can recognize a deference operation in the code, and then explain what the requirement for a safe dereference is and why. Distinguish exogenous from endogenous linked lists. Why might bugs only be found in the invariant checker rather than by the driver? Why is it preferable that they are found in the invariant checker rather than the driver? What is an interface? Why do we use them? What is an abstract class? Why do we have them? Explain AbstractCollection. How is it able to implement almost all the required methods? What can you say about the implementation? Give three reasons why one would override a method in an abstract superclass. Why is a nested class used to implement iterators not declared static? What are generic classes? Why do we use them? Clearly explain the advantage(s). Give an example generic class from the standard Java collection library. Suppose that you convert a Bag class to be generic. Name at least one place w here the word Bag remains just Bag instead of changing to Bag. A generic type parameter (such as T) can be used most places where a class name can be used. Where can it not be used? Why not? Describe the insertion sort algorithm. Under what conditions does it do particularly well? Compare and contrast Stacks and Queues. What are some classic situations where Stacks are used appropriately? Queues? Why does a queue implementation using a linked list require a tail pointer but a stack implementation does not?

Solution

3. how are exception useful for implement libraries or generic ADT used in different application?

Answer :

Use exception handling code (try/catch blocks) appropriately. You can also programmatically check for a condition that is likely to occur without using exception handling.

8. what is an interface? why do we use them?

Answer:

what is an interface:-

!)  interfaces in C# are a means to get around the lack of multiple inheritance in C#.

!!) An interface is a contract between itself and any class that implements it.

!!!)  An interface can contain signatures of methods, properties, indexers & events.

Why use interface:

!) So if an interface implements no functionality then why should we use them.

!!) Interfaces add a plug and play like architecture into your applications.

!!!) Using interface based design concept provides loose coupling, component-based programming, easier maintainability, makes your code base more scalable and makes code reuse much more accessible because implementation is separated from the interface.

9) what is an abstract class? why do we have them?

Answer:

Abstract classes are classes that contain one or more abstract methods. An abstract method is a method that is declared, but contains no implementation. Abstract classes may not be instantiated, and require subclasses to provide implementations for the abstract methods. Let\'s look at an example of an abstract class, and an abstract method.

17.compare and contrast stacks in queues?

Answer :

Stack:

a stack is defined as a list or sequence of elements that is lengthened by placing new elements \"on top\" of existing elements and shortened by removing elements from the top of existing elements. It is an ADT[Abstract Data Type] with math operations of \"push\" and \"pop\".

Queue:

A queue is a sequence of elements that is added to by placing the new element at the rear of existing and shortened by removing elements in front of queue. It is an ADT[Abstract Data Type].

 What does the acronym \
 What does the acronym \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site