













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














ASSIGNMENT 1 FRONT SHEET Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 19: Data Structures and Algorithms Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Student ID Class Assessor name Student declaration I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature Grading grid P1 P2 P3 M1 M2 M3 D1 D
Assignment Brief 1 (RQF)
Student Name/ID Number: Unit Number and Title: Unit 19: Data Structures and Algorithms Academic Year: 2021 Unit Assessor: Assignment Title: Examine and specify ADT and DSA Issue Date: Submission Date: Internal Verifier Name: Date: Submission Format: Format: ● The submission is in the form of an individual written report and a presentation. This should be written in a concise, formal business style using single spacing and font size 12. You are required to make use of headings, paragraphs and subsections as appropriate, and all work must be supported with research and referenced using the Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. Submission ● Students are compulsory to submit the assignment in due date and in a way requested by the Tutor. ● The form of submission will be a soft copy posted on http://cms.greenwich.edu.vn/. ● Remember to convert the word file into PDF file before the submission on CMS. Note: ● The individual Assignment must be your own work, and not copied by or from another student. ● If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you must reference your sources, using the Harvard style. ● Make sure that you understand and follow the guidelines to avoid plagiarism. Failure to comply this requirement will result in a failed assignment.
Unit Learning Outcomes: LO1 Examine abstract data types, concrete data structures and algorithms LO2 Specify abstract data types and algorithms in a formal notation Assignment Brief and Guidance: Assignment scenario You work as in-house software developer for Softnet Development Ltd, a software body-shop providing network provisioning solutions. Your company is part of a collaborative service provisioning development project and your company has won the contract to design and develop a middleware solution that will interface at the front- end to multiple computer provisioning interfaces including SOAP, HTTP, JML and CLI, and the back-end telecom provisioning network via CLI. Your account manager has assigned you a special role that is to inform your team about designing and implementing abstract data types. You have been asked to create a presentation for all collaborating partners on how ADTs can be utilised to improve software design, development and testing. Further, you have been asked to write an introductory report for distribution to all partners on how to specify abstract data types and algorithms in a formal notation. Tasks Part 1 You will need to prepare a presentation on how to create a design specification for data structures, explaining the valid operations that can be carried out on the structures using the example of:
An object's behavior may be described by a set of values and a set of actions, and this behavior is known as an abstract data type (ADT). The definition of ADT merely specifies which operations must be carried out; it makes no reference of how they must be carried out. It does not describe how the operations will be carried out or how the data in memory will be arranged. Given that it offers a dispassionate view of the implementation, it is dubbed "abstract." Abstraction is the process of presenting only the essentials while obfuscating the information. Figure 1: ADT Features of ADT:
Some operations of stack: Push(): Insert an element named top at one end of the stack. Pop(), Peek(): The item at the top of the stack should be removed and returned. Return the element at the top of the stack without deleting it if the stack is not empty. Size(): Give back the number of items in the stack. Empty(): If the stack is empty return true, otherwise return false. isFull(): If the stack is full, return true, otherwise return false. Push(): add one item on the top of the stack. Five step to work push(): Step 1: Review for full row Step 2: The error happen until the stack complete, and exit. Step 3: Increases top to point next empty space, if the stack is not full. Step 4: Adds the data element to the location of the stack, where top is pointing Step 5: Performance returns. Figure 3: Push Operation
Pop (): Remove the top item out of the stack. Five step to work pop (): Step 1 - Checks if the stack is empty. Step 2 − If the stack is empty, produces an error and exit. Step 3 − If the stack is not empty, accesses the data element at which top is poinƟng. Step 4 − Decreases the value of top by 1. Step 5 − Returns success. Figure 4: Pop Operation Application/Examples of Stack: Figure 5: Example of Stack
Queue operation: Operation Description Clear() Check to clear the queue isEmpty() Check the queue is empty or not empty Enqueue() Add new element at the end of queue Dequeue() Remove first element of the queue Front() Return first element without remove Table 2: Queue Operation Example for queue: Operation Output Input Enqueue(1) (1) Enqueue(2) (1, 2) Dequeue(1) 1 (2) Enqueue(4) (2, 4) Front() 4 (1, 4) Dequeue(2) 2 (4) Dequeue(4) 4 () Dequeue() Error () isEmpty() True () Enqueue(9) (9) Size() 1 Table 3: Example of queue
The first-in-last-out buffer-like behavior of stack memory makes it possible to employ system memory for temporary data storage. It serves as a short-term memory. The memory of the variable is automatically cleared when the computation is finished. Most of the time, methods, local variables, and reference variables are found in the stack section.
Basic Operations of Stack:
When a function call executes, the activation recording for that call is placed onto the stack of the program being executed. When the function returns to its caller and the local variables are no longer known to the execution program, the activation record for this function call is popped off the stack. The last function call on the stack is returned when getting the necessary function calls since it is the stack's top element, and any subsequent function calls will be made to that function as long as there is still another function on the stack that needs to be called.
The execution of an application is supported by a stack of separate software components that cooperate. The components are placed one on top of the other in a hierarchy and may comprise an operating system, architectural layers, protocols, runtime environments, databases, and function calls. Higher-level components execute specialized duties and services for the end user, whereas lower-level components in the hierarchy often interface with hardware. A sequence of intricate instructions that traverse the stack are used by components to directly connect with the application. Figure11: Software Stack
In order to offer certain services to the user, an application is made up of a number of functions that work together in a predetermined architecture. There are three levels in the simplest application architecture: