⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exe2.html

📁 卡耐基课程练习
💻 HTML
字号:
<span class="dialogueheader">Take Assessment: Exercise 2</span><br><br>
  <form name="Assm" id="Assm" method="post" action="https://seqcc.icarnegie.com:443/submitassmcmd.php" enctype="multipart/form-data">

<a name="top_of_page"></a><input name="object_id" id="object_id" value="657732" type="hidden"><table><tbody><tr>
  </tr></tbody></table>
<table><tbody><tr>
<td width="5"><br></td>  <td class="td0_instructions" align="left" valign="top">
     <label class="instructions">Please answer the following question(s).<br>
If the assessment includes multiple-choice questions, click the "Submit Answers" button when you have completed those questions.</label></td>
</tr></tbody></table>
<input name="MAX_FILE_SIZE" id="MAX_FILE_SIZE" value="512000" type="hidden"><table><tbody><tr>
<td width="5"><br></td><script language="JavaScript">document.write('<td class=instructions>' + 'You have 120 minutes to take this assessment.' + '<br>' + 'Please complete this assessment by ' + ComputeLocalDate('2008-11-29 10:50:45 UTC') + '.' + '</td>');</script><td class="instructions">You have 120 minutes to take this assessment.<br>Please complete this assessment by Sat Nov 29 2008 18:50:45 GMT+0800.</td>  <td width="5"><br></td></tr></tbody></table>

<a name="top_13955"></a><table><tbody><tr>
<td width="5"><br></td>  <td class="td0_highlight-label" align="right" nowrap="nowrap" valign="top" width="12">
     <label class="highlight-label">1.</label></td>
<td width="5"><br></td>  <td class="td0_x" align="left" valign="top"> <a href="#13955">Go to bottom of question.</a> </td>
</tr></tbody></table>
<table><tbody><tr>
<td width="5"><br></td>  <td class="td0_x" align="left" valign="top"> <!-- new pg 042903 ici -->

<h2 align="center">Modeling the Gourmet Coffee System</h2>

<h3>Prerequisites, Goals, and Outcomes</h3>
<blockquote> <b><i>Prerequisites:</i></b> Before you begin this exercise, you 
  need mastery of the following:
<ul>
    <li> <em>UML</em> 
      <ul>
        <li>Knowledge of class diagram notation</li>

      </ul>
    </li><li><i>Object-Oriented Design</i> 
      <ul>
        <li>Knowledge of modeling concepts: 
          <ul>
            <li>Identifying classes</li>
            <li>Identifying relationships between classes</li>
            <li>Identifying class attributes</li>

            <li>Identifying class methods</li>
          </ul>
        </li>
      </ul>
  </li></ul>
  <p> <b><i>Goals:</i></b> Reinforce your object-oriented design skills
</p><p> <b><i>Outcomes:</i></b> You will master the following skills: 
  </p><ul>

    <li>Produce a UML class diagram, from a specification, that shows: 
      <ul>
        <li> classes</li>
        <li>attributes</li>
        <li>methods</li>
        <li>relationships</li>
      </ul>

    </li>
  </ul>
</blockquote>
<h3>Background </h3>

<p>This assignment asks you to model a coffee store application. </p>
<h3>Description</h3>
<p><em>Gourmet Coffee</em> is a store that sells coffee from countries around 
  the globe. It also sells coffee brewing machines and other accessories for coffee 
  consumption. The <em>Gourmet Coffee System</em> maintains a product catalog, 
  processes orders, and tracks the store's sales. </p>

<p>The catalog maintains the following information about the store's products:</p>
<ul>
  <li>Coffee
    <ul>
      <li>Code</li>
      <li>Description</li>
      <li>Price</li>
      <li>Country of origin</li>

      <li>Type of roast</li>
      <li>Flavor</li>
      <li>Aroma</li>
      <li>Acidity</li>
      <li>Body</li>
    </ul>

  </li>
</ul>
<ul>
  <li>Coffee brewer
    <ul>
      <li>Code</li>
      <li>Description</li>
      <li>Price</li>
      <li>Model of the brewer</li>

    </ul>
  </li>
  <ul>
    <li>Type of the water supply: <em>Pour-over</em> or <em>Automatic</em></li>
    <li>Capacity: number of cups</li>
  </ul>

</ul>
<ul>
  <li>Coffee accessory
    <ul>
      <li>Code</li>
      <li>Description</li>
      <li>Price</li>
    </ul>
  </li>

</ul>
<p>The following tables show some of the products sold by<cite> Gourmet Coffee</cite>. 
</p>

<blockquote> 
  <table border="0" cellpadding="2" cellspacing="2" width="75%">
    <tbody><tr> 
      <td><img src="/content/SSD/SSD3/4.2.0.1/normal/pg-class-dsgn/pg-dsgnng-class/assm-exer-mdlng-cof-gou-sys/pool-pr-uml-mdlng/qn-pr-mdlng-gou-cof-sys/handout/images/table-coffee.gif" alt="Figure 1 Coffee " height="165" width="570"> 
      </td>
    </tr>
    <tr> 
      <td><strong>Figure 1</strong><em> Coffee </em></td>

    </tr>
  </tbody></table>
</blockquote>

<blockquote>
<table border="0" cellpadding="2" cellspacing="2" width="75%">
  <tbody><tr>
      <td><img src="/content/SSD/SSD3/4.2.0.1/normal/pg-class-dsgn/pg-dsgnng-class/assm-exer-mdlng-cof-gou-sys/pool-pr-uml-mdlng/qn-pr-mdlng-gou-cof-sys/handout/images/table-brewer.gif" alt="Figure 2 Coffee brewers" height="120" width="492"> 
      </td>
  </tr>
  <tr>

      <td><strong>Figure 2</strong><em> Coffee brewers</em></td>
  </tr>
</tbody></table>
</blockquote>

<blockquote> 
  <table border="0" cellpadding="2" cellspacing="2" width="69%">
    <tbody><tr> 
      <td><img src="/content/SSD/SSD3/4.2.0.1/normal/pg-class-dsgn/pg-dsgnng-class/assm-exer-mdlng-cof-gou-sys/pool-pr-uml-mdlng/qn-pr-mdlng-gou-cof-sys/handout/images/table-accessory.gif" alt="Figure 3 Coffee accessories" height="103" width="290"></td>
    </tr>

    <tr> 
      <td><strong>Figure 3</strong><em> Coffee accessories</em></td>
    </tr>
  </tbody></table>
</blockquote>

<p>The <em>Gourmet Coffee System</em>  processes  orders.
  An order contains a list of products, their quantities, and the total cost.
  The following is an
    example
    of
an order:</p>

<blockquote>
<table border="0" cellpadding="2" cellspacing="2" width="75%">
  <tbody><tr>
      <td><img src="/content/SSD/SSD3/4.2.0.1/normal/pg-class-dsgn/pg-dsgnng-class/assm-exer-mdlng-cof-gou-sys/pool-pr-uml-mdlng/qn-pr-mdlng-gou-cof-sys/handout/images/table-order.gif" alt="Figure 4 Order" height="103" width="375"></td>
  </tr>
  <tr>
      <td><strong>Figure 4</strong><em> Order</em></td>
  </tr>

</tbody></table>

</blockquote>

<p>In the <em>Gourmet Coffee System</em>, the user can:</p>
<ul>
  <li>Display the catalog: lists the code and description of
     each product </li>
  <li> Display a  product</li>
  <li>Display the current order: lists quantity, code, and price of each product 
    in the current order, and the total of the order.</li>

  <li>Add a product to the current order—if the specified product is already
    part of the order, this command will modify the quantity of that product</li>
  <li> Remove a product from the current order</li>
  <li>Register the sale of the current order—this command adds the order 
    to the store's sales and empties the current order</li>
  <li> Display the sales: lists all the orders that have been sold</li>
</ul>
<p>Run  the sample executable that is provided to learn more about the <em>Gourmet
Coffee System</em>.</p>

<h3>Files</h3>
<p>Following is a sample executable of the <em>Gourmet Coffee System</em>.</p>
<ul>
  <li><cite><a href="/content/SSD/SSD3/4.2.0.1/normal/pg-class-dsgn/pg-dsgnng-class/assm-exer-mdlng-cof-gou-sys/pool-pr-uml-mdlng/qn-pr-mdlng-gou-cof-sys/handout/gourmet-coffee-sample-executable.jar">gourmet-coffee-sample-executable.jar</a></cite> 
    — Download this file now. It is a sample executable.</li>
</ul>
<h3>Tasks </h3>
<p>These steps will guide you for completing this assignment:</p>

<ol>
  <li><strong>First</strong>, run the sample executable by issuing the following 
    command at the command prompt: 
    <blockquote><tt>C:\&gt;</tt><kbd>java -jar gourmet-coffee-sample-executable.jar</kbd> 
    </blockquote>
  </li>
</ol>
<ol start="2">
  <li><strong>Then</strong>, follow the technique described in page <a href="javascript:ContentByName('pg-mdlng-class');">1.2.5&nbsp;Modeling 
    Classes</a> to model the <em>Gourmet Coffee System</em>. 
    <p> Identify the following:</p>

    <ul>
      <li>The classes</li>
      <li>The association relationships (include direction, multiplicity, and 
        association attribute)</li>
      <li>The specialization/generalization relationships</li>
      <li>The attributes of each class</li>
      <li>The methods of each class</li>

    </ul>
    <p>Your class diagram should include:</p>
    <ul>
      <li>The class of the gourmet coffee application</li>
      <li>The accessor methods</li>
      <li>The mutator methods if are needed</li>
      <li>For the collections: 
        <ul>

          <li> The methods to add and access elements</li>
          <li> The methods to remove elements if are needed</li>
        </ul>
      </li>
      <li>The methods that compute other values not included in the attributes. 
      </li>
    </ul>

    <p>Use Sun's coding conventions when naming classes, methods, and attributes.</p>
  </li>
  <li>Use Eclipse, <a href="http://horstmann.com/violet/" target="externalWindow">Violet</a>, 
    PowerPoint, or another tool of your choosing to draw a UML class diagram.</li>
</ol>
<ol start="4">
  <li>Save the UML class diagram in a SVG, GIF, or JPG format in a file named <em>uml-gou-cof</em>. </li>

</ol>
<h3>Submission</h3>
<p>Upon completion, submit <strong>only</strong> the SVG, GIF, or JPG file <em>uml-gou-cof</em>. 
  The extension of this file will depend on the tool used to create the diagram. 
</p>
 </td>
<td width="5"><br></td></tr></tbody></table>
<a name="13955"></a><table><tbody><tr>
<td width="5"><br></td>  <td class="td0_x" align="left" valign="top"> <a href="#top_13955">Go to top of question.</a> </td>

<td width="5"><br></td></tr></tbody></table>
<hr><table><tbody><tr>
<td width="5"><br></td>  <td class="td0_x" align="left" valign="top"><label class="lbl0-x" for="file_to_add_13955">File to submit:</label><br> <input class="x" name="file_to_add_13955" value="" size="20" maxlength="500" type="file"> </td>
<td width="5"><br></td><td valign="bottom">  <input class="x" value="Upload File" name="add_file" id="add_file" style="width: 12em;" onclick='return SetUploadTime("https://seqcc.icarnegie.com:443/takeassmcmd.php?question_id=13955", 13955, false)' type="submit"></td><td width="5"><br></td></tr></tbody></table>
<hr><input name="pr_state_13955" id="pr_state_13955" value="a:2:{i:0;s:10:&quot;incomplete&quot;;i:1;a:0:{}}" type="hidden"><table><tbody><tr>
  </tr></tbody></table>
<input name="max_mins_per_try" id="max_mins_per_try" value="120" type="hidden">  <input value="2008-11-29 10:50:45 UTC" id="end_date" name="end_date" type="hidden">  <input value="421063" id="course_section_id" name="course_section_id" type="hidden">  <input value="13952" id="assm_id" name="assm_id" type="hidden">  <input value="657732" id="template_id" name="template_id" type="hidden">  <input value="657733" id="record_id" name="record_id" type="hidden">  <input value="" id="client_time" name="client_time" type="hidden"><table><tbody><tr>

<td width="5"><br></td>  <td class="td0_x" align="left" valign="top"> <a href="#top_of_page">Go to top of assessment.</a> </td>
  </tr></tbody></table>
<table><tbody><tr>
<td width="5"><br></td>  <td class="td0_copyright" align="left" valign="top"> ? Copyright 2006 iCarnegie, Inc.  All rights reserved. </td>
</tr></tbody></table>
</form>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -