Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA PROGRAMMING. program and report please, thanks, much appreciated. Assignment Description: Important Note: For this assignment you need to write a report addressing the topics

JAVA PROGRAMMING. program and report please, thanks, much appreciated.

Assignment Description:

Important Note: For this assignment you need to write a report addressing the topics and/or questions that appear throughout this document in bold italics. So you not only submit a working set of programs but also a report on your take on the specified topics and your solutions and/or ideas to address them.

In basic set theory, sets are defined as collections of unique elements. The followings are some operations and/or properties on sets:

We say that A is a subset of B, if every element of A is an element of B.

The union of A and B, is a set whose elements are the elements of A and the elements of B.

The intersection of A and B, is a set whose elements are the elements common to A and B.

Throughout this document, you will find questions that appear in bold italics. You will address these questions in the report that you will submit along with the program. These questions will guide you in how to format your report on the rationale behind your strategy to implement the requirements of this assignment.

>>> You are asked to write a program that prompts the user for the size of two integer arrays, user input for the size must not exceed 50, you must validate this. We will use these arrays to represent our sets. These arrays will be randomly populated in the range that is 1 through double the size of the array. So if the array is of size 20, you will randomly populate it with values in the range 1-40 inclusive. <<<

Following the above mentioned rules for sets, you must avoid having duplicates while randomly populating them. This means that if a random number already exists in the set, you should skip that and generate another random number to store in the array. Does this process seem costly to you? Describe your answer. If you answered in affirmative, describe your solution to try and optimize the process of checking for duplicates. Refer to this segment in your report as Point 1.

You must define the union set of these sets/arrays. What do you pick as its size? You must also make sure that the union set does not have any duplicates. Refer to this in your report as Point 2.

You also must define the intersection of these sets. What would be the reasonable pick for the size of this set? Do we need to worry about duplicates in this set? Refer to this in your report as Point 3.

You must verify whether one of these sets is a subset of the other or not. How costly is this process? Have you been able to find a solution to possibly reduce the cost? Explain your answer. Refer to this in your report as Point 4.

Important note: In your report make sure you identify the trade-off factor of the choices you make in your program.

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_2

Step: 3

blur-text-image_3

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

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

What is Selenium? What are the advantages of Selenium?

Answered: 1 week ago

Question

Explain the various collection policies in receivables management.

Answered: 1 week ago

Question

What are the main objectives of Inventory ?

Answered: 1 week ago