Abstract Data Type Algorithm Headers Each major process has its own algorithm headers. They are defined below. Ordering Textbooks . Save the Order...
View the step-by-step solution to:

Question

# Using the the file , to make a recursive pseudocode algorithm.The algorithm should look for

specific text within all textbooks located in a library including; each textbook title string, each chapter title string, each paragraph string, etc.

This was work done my my team.

Each major process has its own algorithm headers. They are defined below.
Ordering Textbooks
.
Save the Order id, time/date of order, and user id of each order (@OrderID, @OrderDate,
@OrderedBy)
Assign each new textbook to the student that ordered it (@BookType, @StudentID)
Save number of books to be ordered (@OrderedBookCount)
Receiving Textbooks (New Only)
.
Record the time/date and user id that received each order (@OrderID, @ReceiveDate,
.
Compare this number to the order (@OrderID, @BookType, @ ReceivedBookCount =
@OrderedBookCount
Annotate any discrepancies (@OrderID, @OrderIssue)
Create @BookID for each new book (@BookType, @BookID)
.
Assign books to students as needed (@BookID, @StudentID)
Determining Retail Price and Pricing Used Textbooks
Search database for prices of new books (@BookID, @Price)
Based on the condition of used books (see below), determine discounted price (@BookID,
@ConditionDiscount, @Price)

@ConditionDiscount, @Price)
Determining Quantity On Hand
. Check the database for new and used books that are not assigned to a student id (any book with
no student id assigned is assumed to be &quot;on hand&quot;) (@BookID, @StudentID)
Recording Textbook Sales and Returns
. Sales:
o Record sale price (@Cost will be @Price for new books, and @Price *
@ConditionDiscount for used books) (@BookID, @Price, @ConditionDiscount, @Cost)
o Record book id, time/date, and student (@BookID, @PurchaseDate, @StudentID)
Returns:
Font
o Check if BookID exists, if not, create (@BookID, @BookType)
o Record BookID, time/date, and student returning the book (@BookID, @ReturnDate,
@StudentID)
o Determine the condition of used books (Excellent, Good, Poor) (@BookID,
@ConditionDiscount)
o If needed, add book to the database, do not add a student id (@BookID, @StudentID
(NULL))

Textbook Data Structure
Rather than pseudocode, I think a database table structure presents better for understanding:
The Order table tracks all orders placed. OrderID links the Order table to OrderedBooks, ReceivedBooks,
and Issues.
Order
OrderID
OrderDate
OrderedBy
OrderedBookCount
Int
datetime2
string
datetime2
string
int
int
OrderedBooks
Issues
OrderID
BookType
StudentID
OrderID
BookType
StudentID
OrderID
OrderIssue
int
String
string
int
string
string
int
string
When books are received, they are given a BookID and perhaps assigned to a StudentID. The book's
condition is stored in the Books table as well (when returned). The BookPrice table stores the base price
for each type of book, which can be modified based on condition of used books (Cost, stored in Sales
table).
Books
BookPrice
BookID
BookType
StudentID
ConditionDiscount
BookType | Price
int
string
String
string
string
decimal
Sales
Returns
BookID
Cost
PurchaseDate
StudentID
BookID
ReturnDate
StudentID
int
decimal
datetime2
string
int
datetime2
string

Student Data Structure
The Student table stores the following variables with data types: Warring
@Name, string
@Phone, int The Mean be used to find all the books this student currently owns using the following query: Returns can be found using this query:

WHERE StudentID = &lt;id&gt;
Pseudo code for student:
public static int student(int id, int studentArray[ ])
{
Boolean found = false;
while( int I &lt; studentArray. length)
if I found in array
set found = true;
return Boolean;
public static int textbook(int duydec, int textbookArray[ ])
{
Boolean found = false;
While (int I &lt; textbookArray- length)
if I found in array
set found = true;
return boolean

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents