I need help writing a pseducode for a university\'s bookstore. Like the question
ID: 3902905 • Letter: I
Question
I need help writing a pseducode for a university's bookstore. Like the question im looking at the students need to be able to order 5 books from the website that shows the price of each individual book and the total cost of all 5 books when student goes to purchase them. The pseudo code must also contain the input, the process, and the output statements. I cant find this information in my ebook anywhere and what I do find is vague at best. Right now what im struggling with the most is how to write into the psedocode how the student clicks on the schools online bookstore link from the main website. What is the code for this?
Explanation / Answer
Here the interaction is happening with the website and the user:
Most of the code is getting executed at the server end. So basically the user
is interacting with the page.Some code is getting executed at the browser end
also.
1.Server gets the request:Process the request
Input : Request(homepage)
Process: Prepare(homepage)
Send(homepage)
Output : Homepage
2.Page comes to the user:
Input : user selects the books by clicking on the buttons/enters the book name:
Process:
Validate(input)
if OK:
if (count == 5)
Display("No more selection possible")
else:
count = count + 1;
Record(the book selected)
Update(Shopping cart)
else:
Display(Appropriate error message)
Output: Updated Shopping cart/Error message
Input: User clicks on Payment button:
Process:
If ok(shopping cart):
Display(PaymentPage)
Collect(inputs)
Validate(inputs)
Process(inputs) //Send the information to bank gateway etc
Display(OrderConfirmationPage)
else:
Display(ErrorMessage)
Output: OrderConfirmationPage/Error Message.