26 May Java Project
Java project
Outcomes:
• Implement an ADT (specifically a resizable array-based implementation of the Set ADT)
• Test a class
Naming requirements (not following any of these may result in a score of 0):
● The Eclipse project name must be Project2.
● You will have write exactly two source code files: ResizableArraySet.java and SetTester.java
● You will also need to include the Set interface as specified in SetInterface.java. Do not modify this file. Your resizable array set must implement this interface.
● You will use the default package (this means there should be no package statements in any of your files).
Your assignment is to:
1. In a class named ResizableArraySet, implement the abstract data type Set by implementing all of the methods in the interface found in SetInterface.java. Your implementation will use a resizable array of int values that doubles in size any time an item is added when the array is already full. Do not use Java’s ArrayList. You should simply work with an array, and handle the array resizing on your own.
2. The only instance variables should be the array of int values and a counter for the number of entries in the set.
3. There should be two constructors: a. A constructor with no parameters. By default this should use an array instance variable with a starting size of 10.
b. A constructor with an int parameter specifying the starting size of the array instance variable.
4. SetTester should thoroughly test the methods and constructors in the ResizableArraySet class. It should utilize the main() method and helper methods to print to the screen what is being tested, what results are expected, and then show the actual results. This should not involve any interaction from the user. Do not ask the user to enter input. Just run test cases. Output should look something like this:
Creating an empty set and adding three items 4 9 2
Expecting to see 4 9 2
Result 4 9 2
Removing 4 and expecting to see 9 2
Result 9 2
Your test code should not require me to look at your source code. I should know, by running your tester, what is being tested, what results are expected, and what the actual results are. I will be looking for:
● Thoroughness (test all constructors and methods)
● Organization (keep related tests together)
● Readability (use single blank lines in appropriate places to break your code into “chunks” so it’s easy to know when one part of your testing is done and the next part begins). The Arrays.toString() is a useful way to display the contents of an array. Feel free to use it to output your results.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.
