Project Part 1 – business case described
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Project Part 1 – business case described
Problem Description:
Using the steps for Problem Solving – generate for the following problem:
- The test program (test plan is not required) and
- Code to be
-
Create a SortedStringArray class (an array of Strings with entries in sorted order, with no duplicates, that grows as needed) with the following methods:
- SortedStringArray() – Default constructor, Constructs an empty SortedStringArray with an initial capacity of
- SortedStringArray(int initialCapacity) – Initial constructor, Constructs an empty SortedStringArray with the specified initial
- boolean add(String s) – Add entry in the correct sorted
Increases capacity if needed. Returns true if added, false if not o void print() – Print the sorted array
- String get(int index) – Get the entry at the sorted position, returns “ERROR” if given the invalid index
- int getIndex(String entry) – Get the index of the given entry, returns -1 if the entry does not exist
- boolean delete(int index) – Delete the entry at the given index, returns true successfully deleted, false if not
- boolean delete(String entry) – Delete the given entry, returns true successfully deleted, false if not
- int size() – Returns the number of Strings in this
- int capacity() – Returns the capacity of this
- Create an Assign4 class (a test program for SortedStringArray) – a start version has been provided. Each method (except for print) must have at least one
Note: SortedStringArray MUST be written from scratch (i.e. you may not have any import statements)
Submission Requirements:
-
You must create a .zip file that contains ONLY the following (with your name, section, lab teacher listed in comments in the header of each class):
- java file
- java file – test program with at least one test case per section
-
The .zip file must have the following as its name
- Your last name, your first name, the word “Assign4” Example RosenblumHowardAssign4.zip
- Submit the .zip file through the Assignment feature which has been enabled in the CST8110 Brightspace course. This should be directly under the Assignment description.
- Marks will be given for correct submission (i.e. marks will be deducted for incorrect submission!
2026-01-16