Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

What are the attributes of a technical decision?

Answered: 1 week ago

Question

How do the two components of this theory work together?

Answered: 1 week ago