121 lines
6.8 KiB
HTML
121 lines
6.8 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.18"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Queue and Stack: Main Page</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Queue and Stack
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.18 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="PageDoc"><div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">Queue and Stack Documentation</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><h1><a class="anchor" id="intro"></a>
|
|
Introduction</h1>
|
|
<p>The implementation of a "Queue" and a "Stack" based on a "Advanced Singly Linked List".</p>
|
|
<h1><a class="anchor" id="objective"></a>
|
|
Assignment Objective</h1>
|
|
<p>In this assignment an Abstract Data Type of an "Advanced Singly Linked List" shall be implemented against the defined common interface of a list. This interface is declared within file 'list.h'. It is intended to be used by applications or other libraries and aims to abstract the 'list' functionality as far as possible.</p>
|
|
<p>Based on the implementation of that list, the two major goals, 'Queue' and 'Stack' shall be implemented.</p>
|
|
<p>The term 'advanced' in 'Advanced Singly Linked List' refers to the members of the list data: the list shall have</p><ul>
|
|
<li>the pointer to the list head node,</li>
|
|
<li>the pointer to the list tail, and</li>
|
|
<li>the size as its members.</li>
|
|
</ul>
|
|
<p><b>Configuration</b></p>
|
|
<p>There is no configuration required.</p>
|
|
<h1><a class="anchor" id="assignment"></a>
|
|
Assignment</h1>
|
|
<p>The 'Advanced Singly Linked List' shall be implemented in file 'advanced_singly_linked_list.c'. The corresponding header file includes the common interface 'list.h' but does not add functions by its own.</p>
|
|
<p>The 'Queue' shall implement the interface given in 'queue.h' in file 'queue.c'. It shall make use of the linked list.</p>
|
|
<p>The 'Stack' shall implement the interface given in 'stack.h' in file 'stack.c'. It shall make use of the linked list.</p>
|
|
<p>The library 'allocator' is provided for memory allocation functionality that integrates with unit testing. Behind the facade, allocats memory dynamically similar to <code>malloc</code>. Allocated memory must be freed when it is not used anymore. The 'allocator' library must be used for memory alloction operations, otherwise unit tests will fail.</p>
|
|
<ol type="1">
|
|
<li><p class="startli">Implement 'advanced_singly_linked_list.c' against interface indirectly declared in 'list.h': Note that some functions in list.h are commented. Those functions are not required for implementing Queue or Stack. It is allowed to reuse the implementation of the 'simple_singly_linked_list' of an earlier assignment and turn it into an advanced singly linked list. Insertion at head and tail as well removal at head MUST have O(1)!</p>
|
|
<p class="startli">Make the program and tests compile: Implement all functions in all relevant files declared in the headers EMTPY (return nothing, 0, false, ... as required).</p><ul>
|
|
<li>All unit tests shall run but FAIL after this step</li>
|
|
<li><b>–COMMIT–</b></li>
|
|
</ul>
|
|
</li>
|
|
<li>Implement the empty functions to make the unit tests pass one by one.<ul>
|
|
<li>Because unit tests depend on more than one function, it is a good idea to implement all <code>obtain</code>, <code>release</code>, and <code>get_size</code> functions before running the tests.</li>
|
|
<li>The purpose of a function is specified as API documentation within the header files.</li>
|
|
<li>Obey comments in source files. Run the unit tests frequently and fix failures.</li>
|
|
<li><b>–COMMIT– after each implemented function.</b></li>
|
|
</ul>
|
|
</li>
|
|
</ol>
|
|
<p>Main driver is not required in this assignment.</p>
|
|
<h1><a class="anchor" id="notes"></a>
|
|
Notes</h1>
|
|
<ol type="1">
|
|
<li>Again: Earlier implemenation of 'simple singly linked list‘ may be reused but MUST be transformed into an 'advanced singly linked list’.</li>
|
|
<li>make cleantest: This new make target for clearing the console, building, and running unit test is available.</li>
|
|
<li>Sometimes changes are not properly detected by incremental builds. If something very strange happens during compilation, try to run <code>make clean</code> followed by <code>make</code> to start a clean build. This approach is also recommended after everthing is done, because some compiler warning appears only in clean builds. </li>
|
|
</ol>
|
|
</div></div><!-- PageDoc -->
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Sun Feb 28 2021 22:23:09 for Queue and Stack by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.18
|
|
</small></address>
|
|
</body>
|
|
</html>
|