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.

Screen Shot 2019-10-01 at 8.22.00 AM.png







Screen Shot 2019-10-01 at 8.22.14 AM.png


Screen Shot 2019-10-01 at 8.22.45 AM.pngScreen Shot 2019-10-01 at 8.22.38 AM.png


Screen Shot 2019-10-01 at 8.22.53 AM.png

Screen Shot 2019-10-01 at 8.22.00 AM.png

Abstract Data Type Algorithm Headers
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,
@ReceiveBy)
Verify the number of each textbook received (@BookType, @ReceivedBookCount)
.
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)

Screen Shot 2019-10-01 at 8.22.14 AM.png

@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 "on hand") (@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))

Screen Shot 2019-10-01 at 8.22.38 AM.png

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
ReceiveDate
ReceiveBy
OrderedBookCount
Received BookCount
Int
datetime2
string
datetime2
string
int
int
OrderedBooks
ReceivedBooks
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

Screen Shot 2019-10-01 at 8.22.45 AM.png

Student Data Structure
The Student table stores the following variables with data types: Warring
@Name, string
@Address. 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:

Screen Shot 2019-10-01 at 8.22.53 AM.png

WHERE StudentID = <id>
Pseudo code for student:
public static int student(int id, int studentArray[ ])
{
Boolean found = false;
while( int I < 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 < textbookArray- length)
if I found in array
set found = true;
return boolean

Recently Asked Questions

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
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes