William McKown
DAT/305
December 17, 2018
When looking for specific textbooks:
//Program requests input of Title to search
“Enter Book Title or Word related to Title”
//User inputs search data
Check to see if data matches any book title
If
Title is found
print “Title name” and “inventory number” associated with it
Else
search paragraph strings for words in title
If
Words are found
print “coinciding title names” and “inventory numbers” associated with those titles
Else
Search sentence strings for words in title
If words are found
Print “coinciding title names” and “inventory numbers” associated with those titles
else
Print “ Book not found in system”
/** Recursive method length (in RecursiveMethods.java).
@param str The string
@return The Length of the string
*/
public static int textbooktitle(String str) {
if (str == null || str .isEmpty())
return 0;
else
return 1 + textbooktitle(str .substring(1));
}
*/
public static int chaptertitle((String str) {
if (str == null || str .isEmpty())
return 1;
else
return 2 + chaptertitle(str .substring(2));
}
*/
Public static int paragraph(String str) {
if (str == null || str .isEmpty())
return 2;
else
return 3 + page(str .substring(3));
}
*/
public static int page(String str) {
if (str == null || str .isEmpty())
return 3
else
return 4 + page(str .isEmpty(4));
}