Question: implement a simple class that represent a mathematical set with only one meaningful operation add package lab1; public class Set { private String items; private

implement a simple class that represent a mathematical set with only one meaningful operation add

package lab1;

public class Set {

private String items;

private int size;

private int capacity;

public Set (int capacity){

}

public int size(){

this.size=size;

return size;

}

public int capacity(){

this.capacity = capacity;

return capacity;

}

public String toString(){

return null;

}

public boolean add(String thing){

if(thing == itmes){

return true;

}

else

{

return false;

}

}

}

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!