149 lines
7.4 KiB
HTML
149 lines
7.4 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>Customer List: Customer List</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" />
|
|
</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">Customer List
|
|
</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">Customer List </div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>Peter Bauer, Stefan Schraml</dd></dl>
|
|
<p>German variant below</p>
|
|
<h1><a class="anchor" id="intro"></a>
|
|
Introduction</h1>
|
|
<p>Your task is to implement a customer list. The focus is on administrative functions (initializing, adding customers to the list) and simple overview functions (list length, listing customers with specific revenues).</p>
|
|
<h1><a class="anchor" id="datastructures"></a>
|
|
Data Structures</h1>
|
|
<h2><a class="anchor" id="CustomerList"></a>
|
|
CustomerList</h2>
|
|
<p>The <code>CustomerList</code> has a maximum of 13 entries. The <code>CustomerList</code> is a struct with the following fields:</p><ul>
|
|
<li><code>length</code> (int): The number of entries in the list.</li>
|
|
<li><code>customers</code> (array of pointers to <code>struct CustomerListEntry</code>): see below.</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="CustomerListEntry"></a>
|
|
CustomerListEntry</h2>
|
|
<p>A <code>CustomerListEntry</code> contains all data related to a customer, including:</p><ul>
|
|
<li><code>id</code> (int): The unique customer ID.</li>
|
|
<li><code>customer_name</code> (const pointer to a char (const char* customer_name)): The name of the customer.</li>
|
|
<li><code>revenue</code> (int): The revenue generated with the customer, measured in €1000.</li>
|
|
</ul>
|
|
<h1><a class="anchor" id="Functions"></a>
|
|
Functions</h1>
|
|
<ul>
|
|
<li><code>init_customer_list()</code>: Sets the number of entries to 0.</li>
|
|
<li><code>get_length()</code>: Returns the number of entries in the list.</li>
|
|
<li><code>create_customer()</code>: Creates a new customer.</li>
|
|
<li><code>add_customer()</code>: Adds a single entry to the list.</li>
|
|
<li><code>add_customers()</code>: Adds multiple entries to the list.</li>
|
|
<li><code>get_customer_with_index()</code>: Retrieves the customer at a specific index in the list.</li>
|
|
<li><code>get_customer_with_id()</code>: Searches for a customer with a specific ID.</li>
|
|
<li><code>get_customers_with_revenue()</code>: Finds customers within specific revenue bounds.</li>
|
|
<li><code>get_customer_with_highest_revenue()</code>: Finds the customer with the highest revenue.</li>
|
|
<li><code>get_customer_with_lowest_revenue()</code>: Finds the customer with the lowest revenue.</li>
|
|
<li><code>get_top_n_customers_revenue()</code>: Finds the top <code>n</code> customers with the highest revenue.</li>
|
|
<li><code>get_bottom_n_customers_revenue()</code>: Finds the bottom <code>n</code> customers with the lowest revenue.</li>
|
|
<li><code>get_customer_id()</code>: Retrieves the ID of a customer.</li>
|
|
</ul>
|
|
<h1><a class="anchor" id="intro_de"></a>
|
|
Einführung</h1>
|
|
<p>Sie haben die Aufgabe eine Kundenliste zu implementieren. Wir beschränken uns auf Verwaltungsfunktionen (Initialisieren, Kunden in die Liste einzutragen) und kleine Überblicksfunktionen (Länge der Liste, Auflisten von Kunden mit bestimmten Umsätzen).</p>
|
|
<h1><a class="anchor" id="datastructures_de"></a>
|
|
Die Datenstrukturen</h1>
|
|
<h2><a class="anchor" id="CustomerList"></a>
|
|
CustomerList</h2>
|
|
<p>Die CustomerList hat eine maximale Anzahl von 13 Einträgen. Die CustomerList ist ein struct mit den Feldern</p><ul>
|
|
<li>length (int)</li>
|
|
<li>customers (Array von Pointern auf ein struct CustomerListEntry): siehe unten</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="CustomerListEntry"></a>
|
|
CustomerListEntry</h2>
|
|
<p>Ein CustomerListEntry hält alle Daten, die zu einem Kunden gehören, welche sind:</p><ul>
|
|
<li>id (int): Die eindeutige Kundennummer.</li>
|
|
<li>customer_name (const Pointer auf ein char (const char* customer_name))</li>
|
|
<li>revenue (int): Der Umsatz, der mit dem Kunden erzielt wurde in 1000 €</li>
|
|
</ul>
|
|
<h1><a class="anchor" id="Die"></a>
|
|
Funktionen</h1>
|
|
<ul>
|
|
<li>init_customer_list(): Setzt die Anzahl der Einträge auf 0.</li>
|
|
<li>get_length(): Gibt die Anzahl der Einträge zurück.</li>
|
|
<li>create_customer(): Erstellt einen neuen Kunden.</li>
|
|
<li>add_customer(): Fügt einen Eintrag hinzu.</li>
|
|
<li>add_customers(): Fügt mehrere Einträge hinzu.</li>
|
|
<li>get_customer_with_index(): Liefert den Kunden mit dem Index innerhalb der Liste.</li>
|
|
<li>get_customer_with_id(): Sucht einen Kunden mit einer bestimmten ID.</li>
|
|
<li>get_customers_with_revenue(): Sucht Kunden innerhalb bestimmter Umsatzgrenzen.</li>
|
|
<li>get_customer_with_highest_revenue(): Sucht den Kunden mit dem höchsten Umsatz.</li>
|
|
<li>get_customer_with_lowest_revenue(): Sucht den Kunden mit dem niedrigsten Umsatz.</li>
|
|
<li>get_top_n_customers_revenue(): Sucht die n Kunden mit dem höchsten Umsatz.</li>
|
|
<li>get_bottom_n_customers_revenue(): Sucht die n Kunden mit dem niedrigsten Umsatz</li>
|
|
<li>get_customer_id(): Liefert die ID eines Kunden. </li>
|
|
</ul>
|
|
</div></div><!-- PageDoc -->
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Mon Dec 9 2024 23:15:48 for Customer List 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>
|