Phan tuan manh bh00210 data structures algorithms asm1 1st Distinction

94 10 0
Phan tuan manh bh00210 data structures  algorithms asm1 1st Distinction

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Grade Distinction The primary objectives of this report are as follows: 1. Explanation on how to specify an abstract data type using the example of a software stack: 2. Explanation of the advantages of encapsulation and information hiding when using an ADT: 3. Discussion of imperative ADTs with regard to object orientation:

ASSIGNMENT FRONT SHEET Qualification BTEC Level HND Diploma in Computing Unit number and title Unit 19: Data Structures and Algorithms Submission date 10/10/2023 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Phan Tuan Manh Student ID BH00210 Class IT0503 Assessor name Ta Quang Hieu 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 D2 1|P ag e  Summative Feedback: Grade:  Resubmission Feedback: Assessor Signature: Date: Internal Verifier’s Comments: IV Signature: 2|P ag e Table of Contents I INTRODUCTION II BODY - P1 CREATE A DESIGN SPECIFICATION FOR DATA STRUCTURES EXPLAINING THE VALID OPERATIONS THAT CAN BE CARRIED OUT ON THE STRUCTURES - Data Structures - Abstract data type Stack ADT - 11 3.1 3.2 3.3 Stack operations and working mechanism 12 Implementation of a Stack ADT in Code 14 Applications/Examples of Stack 17 P2 DETERMINE THE OPERATIONS OF A MEMORY STACK AND HOW IT IS USED TO IMPLEMENT FUNCTION CALLS IN A COMPUTER 18 Memory Stack - 18 Operations of a Memory Stack 18 Using the Memory Stack for Function Calls - 20 M1 ILLUSTRATE, WITH AN EXAMPLE , A CONCRETE DATA STRUCTURE FOR A FIRST IN FIRST OUT (FIFO) QUEUE 22 Queue Data Structure - 22 FIFO Principle of Queue - 22 Implementation of FIFO Queue 23 M2 COMPARE THE PERFORMANCE OF TWO SORTING ALGORITHMS 26 Sorting Algorithms - 26 1.1 1.2 1.3 Bubble Sort Algorithm: 32 2.1 2.2 2.3 The Purpose of Sorting 26 Different Sorting Algorithms 27 Comparing Tow Sorting Algorithms - 29 How does Bubble Sort Work? 32 Implementation of Bubble Sort 36 Time Complexity 38 Selection Sort Algorithm: - 39 3.1 3.2 3.3 How does Selection Sort Algorithm work? - 39 Implementation of Bubble Sort 44 Time complexity 45 D1 ANALYSE THE OPERATION, USING ILLUSTRATIONS, OF TWO NETWORK SHORTEST PATH ALGORITHMS, PROVIDING AN EXAMPLE OF EACH 46 Explanation 46 Dijkstra Algorithm 47 2.1 2.2 2.3 How does Dijkstra’s Algorithm works? - 47 Implementation of Dijkstra’s Algorithm 54 Time Complexity 57 Bellman-Ford Algorithm - 57 3.1 3.2 3.3 How does Bellman-Ford’s Algorithm works? 58 Implementation of Bellman-Ford’s Algorithm 65 Time Complexity 70 P3 USING AN IMPERATIVE DEFINITION, SPECIFY THE ABSTRACT DATA TYPE FOR A SOFTWARE STACK 71 3|P ag e Introduction to Formal Specification and Types of Languages - 71 Definitions of Pre-condition, Post-condition, and Error-condition - 71 2.1 2.2 2.3 Pre-condition: - 72 Post-condition: 72 Error-condition: - 72 Specification of Stack Operations - 72 3.1 3.2 3.3 3.4 3.5 Operation: push(item) - 72 Operation: pop() 73 Operation: peek() - 74 Operation: isEmpty() - 75 Operation: size() 75 Implementation example Stack in software 76 M3 EXAMINE THE ADVANTAGES OF ENCAPSULATION AND INFORMATION HIDING WHEN USING AN ADT - 79 Understanding Encapsulation and Information Hiding 79 1.1 1.2 Encapsulation 79 Information hiding 80 Application of Read-only and Write-only Properties 81 Advantages of Encapsulation and Information Hiding in an ADT 81 Encapsulation Using Accessors and Mutators 81 Encapsulation Using Properties - 82 D2 DISCUSS THE VIEW THAT IMPERATIVE ADTS ARE A BASIS FOR OBJECT ORIENTATION AND, WITH JUSTIFICATION, STATE WHETHER YOU AGREE. - 84 Imperative ADTs and Object Orientation 84 Integrating Imperative ADTs into an Object-Oriented Paradigm 84 Comparing and Contrasting Traditional Imperative ADTs with OOP-based ADTs 85 Discussion on Imperative ADTs as a Basis for Object Orientation 85 Example to prove the viewpoint - 87 5.1 5.2 Imperative ADT - Stack Functions: - 87 OOP-based ADT - Stack Class: 88 III EVALUATION - 89 IV CONCLUSION - 91 V REFERENCES 93 4|P ag e Table of Figuares FIGURE 1: ABSTRACT DATA TYPE - 10 FIGURE 2: STACK ADT - 11 FIGURE 3: STACK OPERATIONS - 13 FIGURE 4: IMPLEMENTATION OF A STACK ADT (1) - 14 FIGURE 5: IMPLEMENTATION OF A STACK ADT (2) - 15 FIGURE 6: IMPLEMENTATION OF A STACK ADT (3) - 16 FIGURE 7: EXAMPLE MEMORY STACK FOR FUNCTION CALLS - 21 FIGURE 8: QUEUE DATA STRUCTURE (GEEKSFORGEEKS, 2023) 22 FIGURE 9: FIFO PROPERTY IN QUEUE (GEEKSFORGEEKS, 2023) 23 FIGURE 10: FIFO QUEUE USING JAVA (1) - 24 FIGURE 11: FIFO QUEUE USING JAVA (2) - 25 FIGURE 12: BUBBLE SORT FLOW CHART - 33 FIGURE 13: BUBBLE SORT ALGORITHM : PLACING THE LARGEST ELEMENT AT CORRECT POSITION (GEEKSFORGEEKS, 2023) - 34 FIGURE 14: BUBBLE SORT ALGORITHM : PLACING THE SECOND LARGEST ELEMENT AT CORRECT POSITION (GEEKSFORGEEKS, 2023) 35 FIGURE 15: BUBBLE SORT ALGORITHM : PLACING THE REMAINING ELEMENTS AT THEIR CORRECT POSITIONS (GEEKSFORGEEKS, 2023) - 35 FIGURE 16: IMPLEMENTATION OF BUBBLE SORT (1) 37 FIGURE 17: IMPLEMENTATION OF BUBBLE SORT (2) 38 FIGURE 18: SELECTION SORT FLOW CHART 40 FIGURE 19: SELECTION SORT ALGORITHM | SWAPPING 1ST ELEMENT WITH THE MINIMUM IN ARRAY (GEEKSFORGEEKS, 2023) 41 FIGURE 20: SELECTION SORT ALGORITHM | SWAPPING I=1 WITH THE NEXT MINIMUM ELEMENT (GEEKSFORGEEKS, 2023) - 42 FIGURE 21: SELECTION SORT ALGORITHM | SWAPPING I=2 WITH THE NEXT MINIMUM ELEMENT (GEEKSFORGEEKS, 2023) - 42 FIGURE 22: SELECTION SORT ALGORITHM | SWAPPING I=3 WITH THE NEXT MINIMUM ELEMENT (GEEKSFORGEEKS, 2023) - 43 FIGURE 23: SELECTION SORT ALGORITHM | REQUIRED SORTED ARRAY (GEEKSFORGEEKS, 2023) 43 FIGURE 24: IMPLEMENTATION OF SELECTION SORT (1) - 44 FIGURE 25: IMPLEMENTATION OF SELECTION SORT (2) - 45 FIGURE 26: EXAMPLE SHORTEST PATH ALGORITHM - 46 FIGURE 27: DIJKSTRA’S ALGORITHM FLOW CHART - 48 FIGURE 28: DIJKSTRA’S ALGORITHM - 49 FIGURE 29: DIJKSTRA’S ALGORITHM STEP - 50 FIGURE 30: DIJKSTRA’S ALGORITHM STEP - 51 FIGURE 31: DIJKSTRA’S ALGORITHM STEP - 52 FIGURE 32: DIJKSTRA’S ALGORITHM STEP - 53 FIGURE 33: DIJKSTRA’S ALGORITHM STEP - 54 FIGURE 34: IMPLEMENTATION OF DIJKSTRA’S ALGORITHM (1) - 55 FIGURE 35: IMPLEMENTATION OF DIJKSTRA’S ALGORITHM (2) - 56 FIGURE 36: IMPLEMENTATION OF DIJKSTRA’S ALGORITHM (3) - 56 FIGURE 37: INITIAL GRAPH (GEEKSFORGEEKS, 2023) 58 FIGURE 38: INITIALIZE A DISTANCE ARRAY (GEEKSFORGEEKS, 2023) 59 FIGURE 39: 1ST RELAXATION (GEEKSFORGEEKS, 2023) - 60 FIGURE 40: 2ND RELAXATION (GEEKSFORGEEKS, 2023) - 61 FIGURE 41: 3RD RELAXATION (GEEKSFORGEEKS, 2023) - 62 5|P ag e FIGURE 42: 4TH RELAXATION (GEEKSFORGEEKS, 2023) - 63 FIGURE 43: 5TH RELAXATION (GEEKSFORGEEKS, 2023) - 64 FIGURE 44: 6TH RELAXATION (GEEKSFORGEEKS, 2023) - 65 FIGURE 45: IMPLEMENTATION OF BELLMAN-FORD’S ALGORITHM (1) - 66 FIGURE 46: IMPLEMENTATION OF BELLMAN-FORD’S ALGORITHM (2) - 67 FIGURE 47: IMPLEMENTATION OF BELLMAN-FORD’S ALGORITHM (3) - 68 FIGURE 48: IMPLEMENTATION OF BELLMAN-FORD’S ALGORITHM (4) - 69 FIGURE 49: OPERATION: PUSH(ITEM) - 73 FIGURE 50: OPERATION: POP() 74 FIGURE 51: OPERATION: PEEK() - 74 FIGURE 52: OPERATION: ISEMPTY() - 75 FIGURE 53: OPERATION: SIZE() 76 FIGURE 54: UNDO/REDO FUNCTIONALITY IN A TEXT EDITOR 77 FIGURE 55: ENCAPSULATION USING ACCESSORS AND MUTATORS - 82 FIGURE 56: ENCAPSULATION USING PROPERTIES - 83 FIGURE 57: IMPERATIVE ADT - 87 FIGURE 58: IMPERATIVE OOP - 88 6|P ag e I Introduction In the ever-evolving landscape of software development, innovation and efficiency are key drivers of success As an in-house software developer at Softnet Development Ltd, a renowned provider of network provisioning solutions, I find myself immersed in a compelling scenario Our company is an integral part of a collaborative service provisioning development project, and I have proudly secured the contract to design and develop a middleware solution that will serve as the crucial interface connecting multiple computer provisioning interfaces, including SOAP, HTTP, JML, and CLI, with the telecom provisioning network at the back end via CLI Within this challenging context, my account manager has entrusted me with a special role: to guide and inform our team on the intricacies of designing and implementing abstract data types (ADTs) This assignment calls for the creation of a presentation that will be shared with our esteemed collaborating partners, shedding light on how ADTs can be harnessed to enhance every aspect of software development, from design to testing Moreover, I have been tasked with crafting an introductory report, which will be distributed to all project partners This report aims to provide a comprehensive understanding of how to specify abstract data types and algorithms using a formal notation It will delve into the core principles of ADTs and their potential to elevate software engineering practices The primary objectives of this report are as follows: Explanation on how to specify an abstract data type using the example of a software stack: In this report, I will elucidate the process of defining and specifying an abstract data type, employing the practical example of a software stack This will serve as a foundation for comprehending the broader concepts related to ADTs Explanation of the advantages of encapsulation and information hiding when using an ADT: One of the core principles of ADTs is encapsulation, which promotes the concealment of implementation details I will explore the significance of encapsulation and information hiding in the context of ADTs, highlighting the benefits they bring to software development 7|P ag e Discussion of imperative ADTs with regard to object orientation: As software development embraces object-oriented paradigms, it is crucial to assess how imperative ADTs fit into this landscape This report will engage in a thoughtful discussion, offering insights into the relationship between imperative ADTs and object orientation Through this report, I aim to provide a comprehensive foundation for understanding and harnessing the power of abstract data types in the realm of software development Together, I will embark on a journey to explore the intricacies of ADTs and their transformative potential in shaping the future of software engineering 8|P ag e II Body LO1 Examine abstract data types, concrete data structures and algorithms P1 Create a design specification for data structures explaining the valid operations that can be carried out on the structures Data Structures A data structure is a technique of organizing the data so that the data can be utilized efficiently There are two ways of viewing the data structure: Mathematical/ Logical/ Abstract models/ Views: The data structure is the way of organizing the data that requires some protocols or rules These rules need to be modeled that come under the logical/abstract model Implementation: The second part is the implementation part The rules must be implemented using some programming language Abstract data type An abstract data type is an abstraction of a data structure that provides only the interface to which the data structure must adhere The interface does not give any specific details about something should be implemented or in what programming language In other words, we can say that abstract data types are the entities that are definitions of data and operations but not have implementation details In this case, we know the data that we are storing and the operations that can be performed on the data, but we don't know about the implementation details The reason for not having implementation details is that every programming language has a different implementation strategy for example; a C data structure is implemented using structures while a C++ data structure is implemented using objects and classes 9|P ag e For example, a List is an abstract data type that is implemented using a dynamic array and linked list A queue is implemented using linked list-based queue, array-based queue, and stack-based queue A Map is implemented using Tree map, hash map, or hash table (Abstract data type in data structure - javatpoint) The process of providing only the essentials and hiding the details is known as abstraction Figure 1: Abstract Data Type The user of data type does not need to know how that data type is implemented, for example, we have been using Primitive values like int, float, char data types only with the knowledge that these data type can operate and be performed on without any idea of how they are implemented So a user only needs to know what a data type can do, but not how it will be implemented Think of ADT as a black box which hides the inner structure and design of the data type (geeksforgeeks, 2023) To further elucidate the concept of an Abstract Data Type (ADT), we will employ the example of a software stack A stack is a prime illustration of an ADT, showcasing its essential characteristics 10 | P a g e Encapsulation is a key concept in object-oriented programming (OOP), where everything revolves around objects In OOP programming, a class is a blueprint for creating objects It defines the properties and behaviors that objects of a certain class can have Classes specify what data an object can have (attributes) and what it can (methods) A class bundles its attributes and methods through encapsulation, protecting the data Encapsulation is also used to protect information from being modified or having new errors introduced When you store and lock the information in a bundle, it is much more difficult for users to accidentally modify the information You achieve this by making the data private, meaning you can only access and modify it through methods within the same class This principle ensures data integrity and reduces the risk of accidental data corruption (coursera, 2023) 1.2 Information hiding Information hiding is a concept in object-oriented programming which confirms the security of members of a class from unauthorized access Information hiding is a technique of protecting the data members from being manipulated or hacked from any other source Data is the most sensitive and volatile content of a program which if manipulated can result in an incorrect output and it also harms the integrity of the data Information hiding is controlled in Java with the help of access modifiers (private, public and protected) The data which is public is accessible from outside the class hence if you want to hide your data or restrict it from being accessed from outside, declare your data private Private data is only accessible to the objects of that class only Let us understand Information hiding with the help of an example Suppose you declared a CheckAccount class and you have a Information member balance inside that class Here, the balance of an account is sensitive information You may allow an outside application to check balance inside of an account but, you won’t allow an outside application to alter the balance attribute Thus declaring the balance attribute private you would restrict the access to balance from an outside application Information hiding also reduces some complexity of the system Information hiding can be achieved through the encapsulation, as encapsulation is a subprocess of Information hiding (Bhakti, 2019) 80 | P a g e Application of Read-only and Write-only Properties Now, let's explore how Read-only (can only be read) and Write-only (can only be written) properties contribute to encapsulation and information hiding: Read-only Properties: Read-only properties allow access to data without permitting modifications These properties provide a controlled way to expose information while preventing unauthorized changes For example, you might have a "get" property that allows reading the value of a private field but disallows writing to it Write-only Properties: Write-only properties, on the other hand, enable the modification of data but not allow reading These properties are useful when you need to provide a mechanism for updating values without revealing the current state Typically, they consist of "set" properties that accept new values for private fields but not provide direct access to the existing data Advantages of Encapsulation and Information Hiding in an ADT When using an Abstract Data Type (ADT), encapsulation and information hiding provide several advantages: Data Security: Encapsulation and information hiding protect sensitive data from unauthorized access and modification, enhancing data security Simplified Interfaces: They simplify the interface exposed to external code, reducing complexity and making it easier for users to interact with the ADT Flexibility: Encapsulation allows for changes to the internal implementation without affecting external code This flexibility is essential for maintaining and evolving software systems Encapsulation Using Accessors and Mutators In object-oriented programming, encapsulation is a fundamental concept that refers to the practice of hiding the implementation details of an object and providing an interface to access its properties and behaviors Accessor and mutator methods are two important concepts related to encapsulation in Java Accessor methods, also known as getter methods, are methods that allow you to retrieve the value of an object's private instance variables These methods provide read-only access to the object's state By using 81 | P a g e accessor methods, you can ensure that the object's state is not modified accidentally or maliciously by external code Mutator methods, also known as setter methods, are methods that allow you to modify the value of an object's private instance variables These methods provide write-only access to the object's state By using mutator methods, you can ensure that the object's state is modified only through a controlled interface To achieve encapsulation, classes often use accessors (getters) and mutators (setters) Accessors allow reading data, and mutators allow modifying it This separation of access and modification control ensures data integrity Figure 55: Encapsulation Using Accessors and Mutators Encapsulation Using Properties Properties provide a more elegant way to achieve encapsulation In many programming languages, properties allow you to define accessors and mutators while simplifying their usage 82 | P a g e Figure 56: Encapsulation Using Properties In conclusion, encapsulation is a fundamental concept in object-oriented programming that ensures data security, abstraction, and flexibility When applied to an ADT, it enhances data protection and simplifies interactions with the ADT's interface Properties, including Read-only and Write-only properties, are powerful tools for achieving encapsulation and information hiding in an elegant and organized manner 83 | P a g e D2 Discuss the view that imperative ADTs are a basis for object orientation and, with justification, state whether you agree In this section, we will explore the perspective that imperative Abstract Data Types (ADTs) form the foundation for object-oriented programming (OOP) and provide a comprehensive analysis of this viewpoint We will then express our perspective on whether we agree or disagree with this perspective Imperative ADTs and Object Orientation Imperative ADTs represent data structures that encapsulate data and the operations that can be performed on that data, following an imperative programming paradigm On the other hand, ObjectOriented Programming (OOP) is a paradigm that models real-world entities as objects, encapsulating data and behavior within those objects Integrating Imperative ADTs into an Object-Oriented Paradigm Imperative ADTs can be integrated into an object-oriented paradigm in several ways: Encapsulation: In OOP, objects encapsulate both data and behavior Imperative ADTs can be translated into classes where data becomes object attributes (fields) and operations become methods For example, a stack ADT with push and pop operations can be implemented as a Stack class with push() and pop() methods Inheritance: OOP allows for the creation of new classes by inheriting attributes and methods from existing classes Imperative ADTs can serve as base classes for OOP-based ADTs, providing a foundation for more specialized data structures Polymorphism: Polymorphism in OOP enables objects of different classes to be treated as instances of a common superclass Imperative ADTs can be integrated into a polymorphic hierarchy, allowing various data structures to share a common interface and be used interchangeably 84 | P a g e Comparing and Contrasting Traditional Imperative ADTs with OOP-based ADTs Traditional Imperative ADTs and OOP-based ADTs have similarities and differences: Similarities: Encapsulation: Both paradigms encapsulate data and operations Abstraction: They abstract data manipulation from the underlying implementation Modularity: Both support modular programming by breaking down complex structures into manageable components Differences: Paradigm: Traditional Imperative ADTs are often associated with procedural programming, while OOPbased ADTs are rooted in the object-oriented paradigm Inheritance and Polymorphism: OOP-based ADTs can leverage inheritance and polymorphism, allowing for more flexible and extensible designs Traditional ADTs lack these features Object-Oriented Concepts: OOP-based ADTs leverage object-oriented concepts like classes, objects, inheritance, and polymorphism to create reusable and extensible data structures Language Support: OOP-based ADTs are typically implemented in languages explicitly designed for OOP (e.g., Java, C++, Python), offering native support for object-oriented features Discussion on Imperative ADTs as a Basis for Object Orientation The perspective that imperative Abstract Data Types (ADTs) serve as a foundation for object orientation is well-founded Imperative ADTs and Object-Oriented Programming (OOP) share fundamental concepts, facilitating a seamless transition between the two paradigms I Agreement with the Viewpoint: 85 | P a g e Common Concepts: Both imperative ADTs and OOP place a strong emphasis on encapsulation, which involves bundling data and operations into a unified unit Imperative ADTs encapsulate data and operations within functions, while OOP encapsulates them within objects and methods Evolutionary Connection: The historical evolution of OOP has been influenced by imperative ADTs Early OOP languages like Simula introduced concepts such as classes and objects, which closely align with the principles of imperative ADTs Transitional Role: Imperative ADTs can be regarded as a transitional stepping stone towards OOP They introduce the crucial concept of encapsulation and data abstraction, which are foundational in OOP Considerations: Advanced OOP Features: While imperative ADTs establish a foundation, OOP enriches this foundation by introducing advanced features like inheritance, polymorphism, and dynamic binding These features enable the modeling of complex systems with greater sophistication and flexibility Language Design: OOP is often implemented using languages purposefully designed for it, such as Java, Python, and C++ These languages provide native support for classes and objects, offering a comprehensive framework for OOP that surpasses the capabilities of traditional imperative languages In summary, imperative ADTs undeniably contribute to the foundational concepts of object orientation, particularly by highlighting the importance of encapsulation and data abstraction However, OOP extends and refines these principles through the introduction of advanced features and a more holistic approach to software modeling The relationship between imperative ADTs and OOP is historically significant, symbolizing a stepping stone towards the broader domain of object orientation 86 | P a g e Example to prove the viewpoint Let's provide an example to illustrate the viewpoint that imperative Abstract Data Types (ADTs) can serve as a basis for object orientation 5.1 Imperative ADT - Stack Functions: Figure 57: Imperative ADT 87 | P a g e 5.2 OOP-based ADT - Stack Class: Figure 58: Imperative OOP In the StackFunctions version, I’m using a static context to work with a stack, which is a typical approach in procedural or imperative programming On the other hand, in the OopBaseADT class version, I define a OopBaseADT object that has attributes and methods, showcasing encapsulation and the principles of OOP This transition highlights the foundational bridge between the concepts of imperative ADTs and objectoriented design In conclusion, imperative ADTs indeed contribute to the foundations of object orientation by emphasizing encapsulation and data abstraction However, OOP extends and refines these principles through the introduction of advanced features and a more holistic approach to software modeling Imperative ADTs can be seen as a transitional step toward OOP, providing a stepping stone to a broader scope of object orientation 88 | P a g e III Evaluation Assignment Evaluation Summary P1 - Design Specification for Data Structures: Understanding: I demonstrated a clear understanding of abstract data types and their operations Implementation: I successfully explained valid operations on data structures Usability: I provided a solid foundation for comprehending abstract data types P2 - Memory Stack and Function Calls: Understanding: I effectively explained the operations of a memory stack and its role in function calls Implementation: I provided a clear explanation Usability: I demonstrated practical knowledge of stack implementation in function calls M1 - Concrete Data Structure for FIFO Queue: Understanding: I illustrated a concrete FIFO queue data structure Implementation: I presented a relevant example Usability: I provided a practical understanding of FIFO queues M2 - Comparison of Sorting Algorithms: Understanding: I analyzed and compared the performance of sorting algorithms Implementation: I explained the strengths and weaknesses of different algorithms Usability: I offered insights into algorithm selection for specific scenarios D1 - Analysis of Network Shortest Path Algorithms: Understanding: I analyzed network shortest path algorithms and provided examples Implementation: I demonstrated comprehension through illustrations 89 | P a g e Usability: I highlighted the practical application of these algorithms P3 - Imperative Definition of Software Stack ADT: Understanding: I specified an abstract data type for a software stack Implementation: I described operations using imperative definitions Usability: I showed understanding of stack ADTs in an imperative context M3 - Examination of Encapsulation and Information Hiding: Understanding: I examined the advantages of encapsulation and information hiding Implementation: I provided insights into the use of accessors, mutators, and properties Usability: I demonstrated a practical understanding of ADT design principles D2 - Discussion on Imperative ADTs and Object Orientation: Understanding: I discussed the relationship between imperative ADTs and OOP Implementation: I provided a well-structured argument Usability: I offered insights into the foundational role of imperative ADTs in OOP Overall Self-assessment: Understanding: I demonstrated a strong understanding of key concepts Implementation: I effectively explained and illustrated concepts Usability: I showed practical knowledge and the ability to apply concepts in real-world scenarios In summary, my assignment reflects a solid grasp of the topics covered, thoughtful explanations, and practical usability My understanding of abstract data types, algorithms, and their applications is evident I will continue building on these foundational skills to excel further in software development and computer science 90 | P a g e IV Conclusion In the ever-evolving landscape of software development, I have had the privilege of working as an in-house software developer at Softnet Development Ltd, a renowned provider of network provisioning solutions This assignment has placed me at the forefront of a collaborative service provisioning development project, where I was entrusted with designing and developing a middleware solution This middleware serves as a critical interface connecting multiple computer provisioning interfaces, including SOAP, HTTP, JML, and CLI, with the telecom provisioning network at the back end via CLI Throughout this journey, I undertook the responsibility of guiding and enlightening our team on the intricate realm of abstract data types (ADTs) My primary focus was on creating a presentation for our esteemed collaborating partners, demonstrating how ADTs can be leveraged to enhance various facets of software development, spanning from initial design to rigorous testing Furthermore, I was tasked with crafting this introductory report, which serves as a comprehensive resource for all project partners This report aims to provide a profound understanding of the specification of abstract data types and algorithms using a formal notation It delves deep into the core principles that underpin ADTs and underscores their potential to elevate the practices of software engineering This report has three primary objectives: Specification of Abstract Data Types: I have elucidated the process of defining and specifying an abstract data type using the practical example of a software stack This foundational knowledge serves as a stepping stone to comprehending the broader concepts related to ADTs Advantages of Encapsulation and Information Hiding: I have explored the pivotal role of encapsulation, a core principle of ADTs, and how it fosters the concealment of implementation details The report highlights the profound benefits that encapsulation and information hiding bring to the realm of software development Imperative ADTs and Object Orientation: With software development's shift towards object-oriented paradigms, I have thoughtfully discussed how imperative ADTs seamlessly integrate into this landscape This discussion offers valuable insights into the relationship between imperative ADTs and the world of object orientation 91 | P a g e In conclusion, through this report, I have endeavored to provide a comprehensive foundation for understanding and harnessing the power of abstract data types in the realm of software development Together, we embark on a journey to explore the intricacies of ADTs, recognizing their transformative potential in shaping the future of software engineering As I move forward in my role as a software developer and continue to explore the evolving software development landscape, the principles of ADTs will remain an invaluable tool in my arsenal, enabling innovation and efficiency in every project I undertake 92 | P a g e V References Source code: https://github.com/PhanTuanManh/Java.git Slide: https://docs.google.com/presentation/d/1DcIxED3oYfu1mBYJfag1Xbr4cGAoHWQ/edit?usp=sharing&ouid=116355487917524966065&rtpof=true &sd=true Abstract data type in data structure - javatpoint (no date) www.javatpoint.com Available at: https://www.javatpoint.com/abstract-data-type-in-data-structure (Accessed: 08 October 2023) Introduction to stack - data structure and algorithm tutorials (2023) GeeksforGeeks Available at: https://www.geeksforgeeks.org/introduction-to-stack-data-structure-and-algorithm-tutorials/ (Accessed: 08 October 2023) Matthew Martin and Martin, M (2023) Stack vs heap memory – difference between them, Guru99 Available at: https://www.guru99.com/stack-vs-heap.html (Accessed: 08 October 2023) Memory Stack Organization in computer architecture (2023) GeeksforGeeks Available at: https://www.geeksforgeeks.org/memory-stack-organization-in-computer-architecture/ (Accessed: 08 October 2023) Queue Data Structure (2023) GeeksforGeeks Available at: https://www.geeksforgeeks.org/queue-datastructure/ (Accessed: 08 October 2023) Sorting algorithms (2023) GeeksforGeeks Available at: https://www.geeksforgeeks.org/sortingalgorithms/ (Accessed: 09 October 2023) Bubble sort - data structure and algorithm tutorials (2023) GeeksforGeeks Available at: https://www.geeksforgeeks.org/bubble-sort/ (Accessed: 09 October 2023) Shortest path algorithm in Computer Network (no date) Online Courses and eBooks Library Available at: https://www.tutorialspoint.com/shortest-path-algorithm-in-computer-network (Accessed: 09 October 2023) What is Dijkstra’s algorithm?: Introduction to dijkstra’s shortest path algorithm (2023) GeeksforGeeks Available at: https://www.geeksforgeeks.org/introduction-to-dijkstras-shortest-path-algorithm/ (Accessed: 09 October 2023) Bellman Ford’s algorithm (no date) Programiz Available at: https://www.programiz.com/dsa/bellmanford-algorithm (Accessed: 09 October 2023) Algorithms 10: Abstract data types – stack (no date) Sign in or register Available at: https://learn1.open.ac.uk/mod/oublog/viewpost.php?post=162582 (Accessed: 09 October 2023) 93 | P a g e What is encapsulation? (no date) Coursera Available at: https://www.coursera.org/articles/encapsulation (Accessed: 09 October 2023) Bhakti (2019) Difference between data hiding and encapsulation (with comparison chart), Tech Differences Available at: https://techdifferences.com/difference-between-data-hiding-andencapsulation.html#Definition (Accessed: 09 October 2023) 94 | P a g e

Ngày đăng: 13/10/2023, 00:25

Tài liệu cùng người dùng

Tài liệu liên quan