ASSIGNMENT
Qualification BTEC Level 5 HND Diploma in Business
Unit number and title Unit 20: Algorithms and Data Structure
Submission date Date Received 1st submission
Re-submission Date Date Received 2nd submission
Student Name Võ Lâm Trường Student ID FB1100023
Class BSAI-17081 Assessor name Nguyễn Hùng Mạnh
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 M1 M2 D1 D2
1
,BTEC Level 5 HND Diploma in Business
2
,BTEC LEVEL 5 HND DIPLOMA IN BUSINESS LATEST 2023 GRADED A+
❒ Summative Feedback: ◻ Resubmission Feedback:
Internal Verifier’s Comments:
Signature & Date:
3
, BTEC LEVEL 5 HND DIPLOMA IN BUSINESS LATEST 2023 GRADED A+
Contents
A. Examine abstract data types, concrete data structures and algorithms.............................7
I. Create a design specification for data structures explaining the valid operations that
can be carried out on the structures.....................................................................................7
1. Stack..........................................................................................................................7
2. Queue........................................................................................................................8
II. Determine the operations of a memory stack and how it is used to implement function
calls in a computer...............................................................................................................9
1. Discussion memory layout.........................................................................................9
Memory Stack.....................................................................................................9
2. Stack Frame.............................................................................................................12
The Basics......................................................................................................12
The Frame Pointer.........................................................................................13
B. Specify abstract data types and algorithms in a formal notation.....................................13
I. Using an imperative definition, specify the abstract data type for a software stack.....13
II. Results.........................................................................................................................17
C. Implement complex data structures and algorithms.......................................................18
I. Implement a complex ADT and algorithm in an executable programming language to
solve a well defined problem..............................................................................................18
1. Publish/subscribe.....................................................................................................18
What is Publish/subscribe.................................................................................18
Example............................................................................................................20
2. Implementation.......................................................................................................21
Client.Pub.........................................................................................................21
MessageServiceExtension.cs.......................................................................21
Program.cs.................................................................................................22
Subcriber.cs................................................................................................24
Client.Sub..........................................................................................................25
4