Introduction

Your task is to create an ebook reader that retrieves the book data from a network source and displays a portion of it.

Layout

Your screen should be designed in a responsive fashion, with the following requirements:

  • There should be a navigation area that:
    • if the device is taller than wide is positioned on the bottom of the display,
    • if the device is wider than tall is positioned on the right hand side of the display,
    • this area should always be visible, and not scroll with the rest of the content,
    • there should be some controls to navigate through the book in this area,
    • at the bottom of this area the users location should be displayed, if permitted to do so, and if not then the exact text Unable to Access the Users Location Information displayed in its place.
  • There should also be a content area that contains the ebook text, that should be scrollable if the text does not fit on the screen.

Data

The data for the ebook reader will need to be retrieved from a web service. The service is located at http://tmaserv. scem.uws.edu.au/chapters/, which when called will return a JSON object with the number of chunks available to be retrieved as the num attribute.

Retrieving these data is performed through the use of a valid n parameter between 0 and num1. For example, using the URL of: http://tmaserv.scem.uws.edu.au/chapters/?n=0 will retrieve the first chunk of data. This will be returned as a JSON object with two parameters; type and data. The type parameter will contain one of three options; bigheading, heading or paragraph. The type parameter will determine the HTML tag used to display the data in the DOM. Chunks can only be fetched one at a time. Note: For marking we will use different data, with a different number of chunks and different distribution of types.

Your reader should only maintain 7 chunks of the ebook in the DOM at any one time, you will need to fetch the first 7 as the document loads, and then fetch additional sections on request, via the controls in the navigation area. You should provide controls for adding the next chunk, adding the previous chunk, and returning to the start. When you add a chunk to the end of the display you must remove from the DOM the chunk at the other end, maintaining the requirement of 7 chunks being in the DOM at any one time. You should not run past either the beginning or the end of the number of chunks.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.