Question: Data Structures using JAVA. I'd like an expert help with this assignment. Thank You. In Exercise 14 you were asked to design and create an

Data Structures using JAVA. I'd like an expert help with this assignment. Thank You.

In Exercise 14 you were asked to design and create an IntLogInterface.

a. Using the same approaches developed in the text for the ArrayStringLog, create an ArrayIntLog class that implements the IntLogInterface.

b. Create an application called TestLuck that repeatedly generates random numbers between 1 and 10,000 until it generates the same number twice. The program should report how many numbers it had to generate before it matched a previously generated number. Your application should store generated numbers in an ArrayIntLog and use its contains method to test for matches.

public interface StringLogInterface

{

void insert( String element ) ;

/ / Precondition: This String Log is not full .

/ /

/ / Places element into this StringLog.

boolean isFull ( ) ;

/ / Returns true if this StringLog is full , otherwise returns false .

int size ( ) ;

/ / Returns the number of strings in this StringLog.

boolean contains ( String element ) ;

/ / Returns true if element is in this StringLog,

/ / otherwise returns false .

/ / Ignores case differences when doing a string comparison.

void clear ( ) ;

/ / Makes this StringLog empty.

String getName ( ) ;

/ / Returns the name of this StringLog.

String toString( ) ;

/ / Returns a nicely formatted string representing this StringLog.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!