Please stop describing your class as "reusable" like it means something. Classes are generally reusable, so describing one this way doesn't add any information.
Let's look at your SingleArray class.
Rick44 said:
CREATE public class SingleArray
DECLARE number array as integer and set as single dimensional with 10 elements
CREATE public SingleArray and set all numbers/elements to -1
CREATE public void setNumber method to store the values passed in
CREATE public boolean checkValue with val parameter
IF the value entered is between 10 and 100 statement is true
ELSE the statement is false
CREATE public int checkDuplicate and verify if number is already entered
IF value is equal to previous value stored
CONTINUE loop to next value
PRINT a message to the user with all unique numbers entered
From this information, I infer that the
SingleArray class should have a private data member that is a 10-element array of type int. It's not clear to me what the name should be - number?
There should be a default constructor named
SingleArray (no arguments), that sets each element of the array to -1.
There should be a public method named
setNumber that returns void (i.e., doesn't return a value). Your description of what it should do is to vague for me to understand what it's supposed to do. Should this method have a parameter?
There should be a public method named
checkValue that returns a bool value. It has a single parameter named
val. If val is between 10 and 100 this method
returns true. Otherwise, it
returns false. (Not, as you have it "statement is true" and "statement is false".)
There should be a public method named
checkDuplicate that returns an int. Your description doesn't say whether it should have a parameter or not, and your description of what it should do is incorrect. My guess is that it should take a parameter, and that it should compare the parameter value to each value already in the array. You don't have any information about what this method should return. The problem description as given to you should have this information.
Your next step should be coming up with algorithms or pseudocode for the class constructor and the three other methods listed above. Be careful to use exactly these names, because your instructor is likely to deduct points if your give them different names.