Write a “database manager” that can store and work with a table of strings. It could be used to store a class list. Your program should consist of two classes:
This class should store the array (table) as a field and provide the following methods:
Database(int size)–A one-argument constructor which accepts the size of the table (array). It should use this size to allocate (create) the array.
add(int index, String value)–Set the value of the array entry at the specified index. print()–Print the contents of the array.
sort()–Sort the contents of the array in ascending numerical order(Hint: use the Arrays class)
find(String value)–Search for a particular string in the array. If it is found print out “Entry found”, otherwise print out “Not found”.
The Database class should not have a main() method .
This class uses and tests your Database class. It should contain just a main method which does the following:
[url removed, login to view] a Database object of size 10. Instead of the actual number 10 you should use a constant (final) field.
[url removed, login to view] the user to enter strings (lines of text) to add to the table. Input 10 strings and add them using the ‘add’ method of the Database class.
[url removed, login to view] out the resulting table using the Database ‘print’ method.
[url removed, login to view] the database by calling the the ‘sort’ method.
[url removed, login to view] the table again to show the sorted strings.
[url removed, login to view] whether the database contains your name using the ‘find’ method.
Don’t use ‘static’ except for the main() method declarationand final fields
Décerné à :
21 freelance ont fait une offre moyenne de 65 $ pour ce travail
Java expert here, I have experience of jobs like this. I have done quite a few projects like this before and I fully understand your requirements and I will be happy to do your job.
Hi I am a java programmer and i am also an android application developer i have experience in working in net beans too I can complete this project within time with all features Hope you hire me Thank you
Hi, I can finish your project within 2 days. I will deliver high quality code. I won't stop before you are 100% happy with my work! Please contact me to discuss further details.