亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? exe5.html

?? 卡耐基課程練習
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
</ul>
<ul>
  <li> <code><em>private XMLSalesFormatter()</em></code>. Constructor that is 
    declared private so it is inaccessible to other classes. A private constructor 
    makes it impossible for any other class to create an instance of class <code>XMLSalesFormatter</code>.</li>
</ul>
<ul>
  <li> <code><em>public String formatSales(Sales sales)</em></code>. Produces 
    a string that contains the specified sales information in an XML format.</li>
</ul>

<blockquote> 
  <ul>
    <li>The string should begin with the following XML: </li>
    <blockquote> 
      <pre>&lt;Sales&gt;</pre>
    </blockquote>
    <li>Each order in the sales information should have the following format: 
      <pre>  &lt;Order total="<em>totalCost</em>"&gt;<br>    &lt;OrderItem quantity="<em>quantity1</em>" price="<em>price1</em>"&gt;<em>code1</em>&lt;/OrderItem&gt;

    ...<br>    &lt;OrderItem quantity="<em>quantityN</em>" price="<em>priceN</em>"&gt;<em>codeN</em>&lt;/OrderItem&gt;<br>  &lt;/Order&gt;</pre>
      <p> where:</p>

    </li>
  </ul>
  <ul>
    <ul>
      <li><em>quantityX</em> is the quantity of the product.</li>
      <li><em>codeX</em> is the code of the product.</li>

      <li><em>priceX</em> is the price of the product.</li>
      <li><em>totalCost</em> is the total cost of the order.</li>
    </ul>
  </ul>
  <ul>
    <li>The string should end with the following XML: 
      <blockquote> 
        <pre>&lt;/Sales&gt;</pre>

      </blockquote>
    </li>
  </ul>
</blockquote>
<h4>Class <code>GourmetCoffee</code></h4>
<p>Class <code>GourmetCoffee</code> lets the user display the sales information 
  in one of three formats: plain text, HTML, or XML. A partial implementation 
  of this class is provided in the student archive. </p>
<p><em>Instance variables:</em></p>

<ul>
  <li><code><em>private Sales sales</em></code>. A list of the orders that have 
    been paid for.</li>
</ul>
<ul>
  <li><code><em>private SalesFormatter salesFormatter</em></code>. A reference 
    variable that refers to the current formatter: a <code>PlainTextSalesFormatter</code>, 
    <code>HTMLSalesFormatter</code>, or <code>XMLSalesFormatter</code> object.</li>

</ul>
<p><em>Constructor and methods:</em></p>
<p>The following methods and constructor are complete and require no modification:</p>
<ul>
  <li> <code><em>public static void main(String[] args) throws IOException</em></code>. 
    Starts the application.</li>
</ul>
<ul>
  <li> <code><em>private GourmetCoffee()</em></code>. Initialize instance variables 
    <code>sales</code> and <code>salesFormatter</code>.</li>

</ul>
<ul>
  <li> <code><em>private Catalog loadCatalog()</em></code>.Populates the product 
    catalog.</li>
</ul>
<ul>
  <li> <code><em>private void loadSales(Catalog catalog)</em></code>. Populates 
    the <code>sales</code> object.</li>

</ul>
<ul>
  <li><code><em>private int getChoice() throws IOException</em></code>. Displays 
    a menu of options and verifies the user's choice.</li>
</ul>
<p>The following methods should be completed:</p>
<ul>
  <li><code><em>private void setSalesFormatter(SalesFormatter newFormatter)</em></code>. 
    Changes the current formatter by updating the instance variable <code>salesFormatter</code> 
    with the object specified in the parameter <code>newFormatter</code>.</li>

</ul>
<ul>
  <li><code><em>private void displaySales()</em></code>. Displays the sales information 
    in the standard output using the method <code>salesFormatter.formatSales</code> 
    to obtain the sales information in the current format.</li>
</ul>
<ul>
  <li><code><em>private void run() throws IOException</em></code>. Presents the 
    user with a menu of options and executes the selected task </li>
</ul>
<ul>

  <ul>
    <li>If the user chooses option 1, <code>run</code> calls method <code>setSalesFormatter</code> 
      with the singleton instance of class <code>PlainTextSalesFormatter</code>, 
      and calls method <code>displaySales</code> to display the sales information 
      in the standard output.</li>
  </ul>

</ul>
<ul>
  <ul>
    <li>If the user chooses option 2, <code>run</code> calls method <code>setSalesFormatter</code> 
      with the singleton instance of class <code>HTMLSalesFormatter</code>, and 
      calls method <code>displaySales</code> to display the sales information 
      in the standard output.</li>

  </ul>
</ul>
<ul>
  <ul>
    <li>If the user chooses option 3, <code>run</code> calls method <code>setSalesFormatter</code> 
      with the singleton instance of class <code>XMLTextSalesFormatter</code>, 
      and calls method <code>displaySales</code> to display the sales information 
      in the standard output.</li>

  </ul>
</ul>
<h3>Files</h3>
The following files are needed to complete this assignment: 
<ul>
  <li><cite><a href="/content/SSD/SSD3/4.2.0.1/normal/pg-class-imp/pg-adv-clss-dsgn/assm-exer-dsgn-ptrns/pool-pr-dsgn-ptrns/qn-pr-formtr-gou-sys/handout/student-files.zip"><code>student-files.zip</code></a></cite> 
    — Download this file. This archive contains the following: 
    <ul>
      <li>Class files 
        <ul>
          <li><cite><code>Coffee.class</code></cite></li>

          <li><cite><code>CoffeeBrewer.class</code></cite></li>
          <li><cite><code>Product.class</code></cite> </li>
          <li><cite><code>Catalog.class</code></cite> </li>
          <li><cite><code>OrderItem.class</code></cite> </li>
          <li><cite><code>Order.class</code></cite> </li>

          <li><cite><code>Sales.class</code></cite></li>
        </ul>
      </li>
      <li>Documentation 
        <ul>
          <li><cite><code>Coffee.html</code></cite></li>
          <li><cite><code>CoffeeBrewer.html</code></cite></li>
          <li><cite><code>Product.html</code></cite><code><cite> </cite></code></li>

          <li><cite><code>Catalog.html</code></cite><code><cite></cite></code> 
          </li>
          <li> <cite><code>OrderItem.html</code></cite> </li>
          <li><cite><code>Order.html</code></cite> </li>
          <li><cite><code>Sales.html</code></cite> </li>

        </ul>
      </li>
      <li><cite><code>GourmetCoffee.java</code></cite>. A partial implementation 
        of the class <code>GourmetCoffee</code>.</li>
    </ul>
  </li>
</ul>
<h3>Tasks </h3>

<p>Implement the interface <code>SalesFormatter</code> and the classes <code>PlainTextSalesFormatter</code>, 
  <code>HTMLSalesFormatter</code>, <code>XMLSalesFormatter</code>. Finish the 
  implementation of class <code>GourmetCoffee</code>. Document using Javadoc and 
  follow Sun's code conventions. The following steps will guide you through this 
  assignment. Work incrementally and test each increment. Save often.</p>
<ol start="1">
  <li><strong>Extract </strong> the files by
    issuing the following command at  the command prompt:
    <p><tt>C:\&gt;</tt><kbd>unzip student-files.zip</kbd> </p>

  </li>
  <li><strong>Then</strong>, implement interface <code>SalesFormatter</code> from 
    scratch.</li>
</ol>
<ol start="3">
  <li><strong>Next</strong>, implement class <code>PlainTextSalesFormatter</code> 
    from scratch.</li>

</ol>
<ol start="4">
  <li><strong>Then</strong>, implement class <code>HTMLSalesFormatter</code> from 
    scratch.</li>
</ol>
<ol start="5">
  <li><strong>Next</strong>, implement class <code>XMLSalesFormatter</code> from 
    scratch.</li>

</ol>
<ol start="6">
  <li><strong>Then</strong>, complete the method <code>GourmetCoffee.setSalesFormatter</code>.</li>
</ol>
<ol start="7">
  <li><strong>Next</strong>, complete the method <code>GourmetCoffee.</code><code>displaySales</code>.</li>

</ol>
<ol start="8">
  <li><strong>Then</strong>, complete the method <code>GourmetCoffee.run</code>.</li>
</ol>
<ol start="9">
  <li><strong>Finally</strong>, compile and execute the class <code>GourmetCoffee</code>. 
    Sales information has been hard-coded in the <code>GourmetCoffee</code> template 
    provided by iCarnegie. 
    <p></p>

    <ul>
      <li>If the user chooses to display the sales information in plain text, 
        the output should be: 
        <blockquote> 
          <pre>------------------------
Order 1

5 C001 17.99

Total = 89.94999999999999
------------------------
Order 2

2 C002 18.75
2 A001 9.0

Total = 55.5
------------------------
Order 3

1 B002 200.0

Total = 200.0</pre>
        </blockquote>
      </li>
      <li>If the user chooses to display the sales information in HTML, the output 
        should be: 
        <blockquote> 
          <pre>&lt;html&gt;<br>  &lt;body&gt;<br>    &lt;center&gt;&lt;h2&gt;Orders&lt;/h2&gt;&lt;/center&gt;<br>    &lt;hr&gt;<br>    &lt;h4&gt;Total = 89.94999999999999&lt;/h4&gt;<br>      &lt;p&gt;<br>        &lt;b&gt;code:&lt;/b&gt; C001&lt;br&gt;<br>        &lt;b&gt;quantity:&lt;/b&gt; 5&lt;br&gt;<br>        &lt;b&gt;price:&lt;/b&gt; 17.99<br>      &lt;/p&gt;<br>    &lt;hr&gt;<br>    &lt;h4&gt;Total = 55.5&lt;/h4&gt;<br>      &lt;p&gt;<br>        &lt;b&gt;code:&lt;/b&gt; C002&lt;br&gt;<br>        &lt;b&gt;quantity:&lt;/b&gt; 2&lt;br&gt;<br>        &lt;b&gt;price:&lt;/b&gt; 18.75<br>      &lt;/p&gt;<br>      &lt;p&gt;<br>        &lt;b&gt;code:&lt;/b&gt; A001&lt;br&gt;<br>        &lt;b&gt;quantity:&lt;/b&gt; 2&lt;br&gt;<br>        &lt;b&gt;price:&lt;/b&gt; 9.0<br>      &lt;/p&gt;<br>    &lt;hr&gt;<br>    &lt;h4&gt;Total = 200.0&lt;/h4&gt;<br>      &lt;p&gt;<br>        &lt;b&gt;code:&lt;/b&gt; B002&lt;br&gt;<br>        &lt;b&gt;quantity:&lt;/b&gt; 1&lt;br&gt;<br>        &lt;b&gt;price:&lt;/b&gt; 200.0<br>      &lt;/p&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;

        </pre>
        </blockquote>
      </li>
      <li>If the user chooses to display the sales information in XML, the output 
        should be: 
        <blockquote> 
          <pre>&lt;Sales&gt;<br>  &lt;Order total="89.94999999999999"&gt;<br>    &lt;OrderItem quantity="5" price="17.99"&gt;C001&lt;/OrderItem&gt;<br>  &lt;/Order&gt;<br>  &lt;Order total="55.5"&gt;<br>    &lt;OrderItem quantity="2" price="18.75"&gt;C002&lt;/OrderItem&gt;<br>    &lt;OrderItem quantity="2" price="9.0"&gt;A001&lt;/OrderItem&gt;<br>  &lt;/Order&gt;<br>  &lt;Order total="200.0"&gt;<br>    &lt;OrderItem quantity="1" price="200.0"&gt;B002&lt;/OrderItem&gt;<br>  &lt;/Order&gt;<br>&lt;/Sales&gt;

        </pre>
        </blockquote>
      </li>
    </ul>
  </li>
</ol>

<h3>Submission</h3>
<p>Upon completion, submit <strong>only</strong> the following:</p>

<ol>
  <li><code>SalesFormatter.java</code></li>
  <li><code>PlainTextSalesFormatter.java</code></li>
  <li><code>HTMLSalesFormatter.java</code></li>
  <li><code>XMLSalesFormatter.java</code></li>
  <li><code>GourmetCoffee.java</code></li>
</ol>

 </td>
<td width="5"><br></td></tr></tbody></table>
<a name="14555"></a><table><tbody><tr>
<td width="5"><br></td>  <td class="td0_x" align="left" valign="top"> <a href="#top_14555">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_14555">File to submit:</label><br> <input class="x" name="file_to_add_14555" 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=14555", 14555, false)' type="submit"></td><td width="5"><br></td></tr></tbody></table>

<hr><input name="pr_state_14555" id="pr_state_14555" 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:56:22 UTC" id="end_date" name="end_date" type="hidden">  <input value="421063" id="course_section_id" name="course_section_id" type="hidden">  <input value="14552" id="assm_id" name="assm_id" type="hidden">  <input value="657817" id="template_id" name="template_id" type="hidden">  <input value="657818" 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 + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩欧美麻豆| 欧美一区二区三区视频免费播放| 蜜臀精品久久久久久蜜臀| 一区二区三区欧美日韩| 国产精品成人免费在线| 国产精品久久久久久久裸模| 国产无人区一区二区三区| 久久久三级国产网站| 精品电影一区二区| 久久亚洲欧美国产精品乐播| ww久久中文字幕| 久久精品视频在线看| 国产三级欧美三级日产三级99| 精品国产乱码久久久久久牛牛| 91精品国产色综合久久久蜜香臀| 欧美一区二区三区在线看| 精品欧美乱码久久久久久1区2区| 精品国产电影一区二区| 久久久久久久综合狠狠综合| 国产精品对白交换视频| 亚洲影院久久精品| 麻豆久久一区二区| 国产69精品一区二区亚洲孕妇| 国产成人综合在线| 色视频欧美一区二区三区| 717成人午夜免费福利电影| 精品久久久久久久久久久久久久久久久 | 精品一区二区免费在线观看| 韩国精品久久久| 不卡欧美aaaaa| 欧美伊人久久大香线蕉综合69 | 亚洲手机成人高清视频| 亚洲成人自拍网| 激情国产一区二区| 91视频精品在这里| 日韩精品最新网址| 亚洲女人的天堂| 久久99精品久久久久| 99精品久久免费看蜜臀剧情介绍| 欧美日韩亚洲综合| 国产欧美日韩不卡| 天堂一区二区在线免费观看| 国产高清精品网站| 制服丝袜日韩国产| 亚洲四区在线观看| 国产在线精品一区二区三区不卡| 91在线观看成人| 久久精品免费在线观看| 亚洲国产精品久久久久婷婷884| 国产美女精品一区二区三区| 欧美综合在线视频| 中文字幕在线观看一区二区| 久久黄色级2电影| 在线视频一区二区免费| 国产午夜精品一区二区 | 久久久美女毛片| 日日噜噜夜夜狠狠视频欧美人 | 26uuu国产电影一区二区| 亚洲精品伦理在线| 国产一区二区在线观看视频| 91麻豆精品久久久久蜜臀| 亚洲精品一二三区| 成人av在线资源网| 亚洲国产精品ⅴa在线观看| 激情深爱一区二区| 91精品国产高清一区二区三区蜜臀 | 麻豆成人免费电影| 欧美日韩精品久久久| 亚洲欧美成aⅴ人在线观看| 国产成人av福利| 欧美videossexotv100| 青青草97国产精品免费观看 | 国产午夜精品一区二区三区四区 | 欧美大片在线观看一区| 强制捆绑调教一区二区| 91精品国产综合久久久久| 亚洲国产一区二区三区青草影视| 色欧美88888久久久久久影院| 国产精品久久免费看| 国产很黄免费观看久久| 国产三级久久久| 99综合电影在线视频| 欧美激情一二三区| 99免费精品在线| 亚洲精品视频在线观看免费| 91在线云播放| 亚洲大尺度视频在线观看| 欧美视频三区在线播放| 美女网站色91| 国产亚洲美州欧州综合国| 成人av在线播放网址| 亚洲欧美日韩综合aⅴ视频| 欧美丝袜丝nylons| 美女尤物国产一区| 久久久无码精品亚洲日韩按摩| 国产aⅴ精品一区二区三区色成熟| 欧美国产成人在线| 91久久精品一区二区三区| 日韩福利视频导航| 国产网站一区二区三区| 91免费国产在线| 日韩专区一卡二卡| 久久亚区不卡日本| 99视频一区二区三区| 亚洲大型综合色站| 久久综合九色综合欧美亚洲| 97久久精品人人爽人人爽蜜臀| 亚洲一区二区精品久久av| 精品久久久久久久久久久久久久久久久 | 欧美在线观看18| 美女视频黄免费的久久| 国产精品久久久久久久岛一牛影视| 在线亚洲一区二区| 黑人巨大精品欧美黑白配亚洲| 一区二区三区四区在线播放 | 成人免费看黄yyy456| 亚洲一区二区三区四区五区黄 | 日韩理论片中文av| 欧美一级电影网站| 91玉足脚交白嫩脚丫在线播放| 免费一级欧美片在线观看| 国产精品传媒视频| 久久婷婷国产综合精品青草| 91美女在线视频| 国精产品一区一区三区mba视频| 尤物视频一区二区| 国产日韩欧美制服另类| 日韩一区二区电影在线| 色系网站成人免费| 国产传媒一区在线| 久久国产精品免费| 日本午夜精品视频在线观看| 最新日韩av在线| 久久婷婷国产综合国色天香| 91精品国产综合久久精品麻豆 | 日韩精品乱码免费| 亚洲综合免费观看高清完整版在线| 久久伊人蜜桃av一区二区| 欧美高清一级片在线| 成人禁用看黄a在线| 国产一区二区三区精品视频| 免费视频最近日韩| 日日夜夜免费精品| 午夜精品久久久久久久蜜桃app| 亚洲女同ⅹxx女同tv| 亚洲视频在线一区| 国产精品成人网| 国产精品国产三级国产aⅴ中文| 国产校园另类小说区| 欧美大肚乱孕交hd孕妇| 制服丝袜亚洲色图| 在线91免费看| 日韩欧美资源站| 欧美v国产在线一区二区三区| 3d成人h动漫网站入口| 7799精品视频| 欧美一二区视频| 日韩欧美一级二级三级 | 91影视在线播放| 91免费观看在线| 色婷婷av一区二区三区软件| 色播五月激情综合网| 日本精品视频一区二区三区| 色网综合在线观看| 欧美性大战久久久久久久蜜臀| 欧美午夜不卡在线观看免费| 欧美综合亚洲图片综合区| 欧美精品丝袜中出| 日韩欧美中文一区二区| 精品裸体舞一区二区三区| 久久精品一区四区| 国产精品毛片大码女人| 亚洲激情自拍偷拍| 日韩av电影免费观看高清完整版在线观看| 亚洲国产精品久久人人爱| 毛片av一区二区| 国产91精品一区二区麻豆网站| 色综合天天综合网国产成人综合天| 色综合久久久久网| 欧美日韩你懂得| 久久久久久9999| 中文字幕一区二区三区四区不卡| 亚洲最大色网站| 美女一区二区三区在线观看| 成人高清av在线| 欧洲国内综合视频| 久久青草国产手机看片福利盒子 | 久久久综合激的五月天| 国产精品久久久久久亚洲毛片 | eeuss鲁片一区二区三区| 欧美日韩一区视频| 久久先锋影音av| 一区二区三区视频在线看| 久久99国产精品久久99 | 精品亚洲成a人在线观看| 成人h动漫精品一区二区| 制服丝袜日韩国产| 亚洲欧洲99久久| 国产一区二区福利| 欧美日韩精品欧美日韩精品|