• 大小: 1.95MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-01
  • 语言: 其他
  • 标签: SSD3  选择  程序题  

资源简介

包含所有SSD3答案!包含SSD3的选择题,程序题!

资源截图

代码片段和文件信息

import  java.io.*;

/**
 * objects of this class store stock information for a company.
 * The following information is stored.
 * 

     * 
  1. the Dow Jones symbol for the company a String.

  2.  * 
  3. the name of the company a String.

  4.  * 
  5. the highest price reached during the course of the day
     *     a double

  6.  * 
  7. the lowest price reached during the course of the day
     *     a double

  8.  * 
  9. the last trading price recorded when the market closed on the day
     *     a double

  10.  * 

 *
 * @author iCarnegie
 * @version  1.0.0
 */
public class Stock  {

/** Dow Jones symbol for the company */
private String  symbol;

/** the name of the company */
private String  name;

/** the highest price reached during the course of the day */
private double  highestPrice;

/** the lowest price reached during the course of the day */
private double  lowestPrice;

/** the last trading price recorded when the market closed on the day */
private double  lastPrice; 

/**
 * Constructs a Stock object.
 *
 * @param initialSymbol  the symbol of the stock.
 * @param initialName  the name of the company.
 * @param initialHighestPrice   the highest price of the stock.
 * @param initialLowestPrice   the lowest price of the stock.
 * @param initialLastPrice   the close price of the stock.
 */
public Stock (
String initialSymbol
String initialName
double initialHighestPrice
double initialLowestPrice
double initialLastPrice) {

this.symbol = initialSymbol;
this.name = initialName;
this.highestPrice = initialHighestPrice;
this.lowestPrice = initialLowestPrice;
this.lastPrice = initialLastPrice;
}

/**
 * Obtains the symbol of this stock.
 *
 * @return  the symbol of this stock.
 */
public String  getSymbol()  {

return  this.symbol;
}

/**
 * Obtains the name of this stock.
 *
 * @return  the name of this stock.
 */
public String  getName()  {

return  this.name;
}

/**
 * Obtains the highest price of the stock.
 *
 * @return  the highest price of this stock.
 */
public double  getHighestPrice()  {

return  this.highestPrice;
}

/**
 * Obtains the lowest price of the stock.
 *
 * @return  the lowest price of this stock.
 */
public double  getLowestPrice()  {

return  this.lowestPrice;
}

/**
 * Obtains the close price of the stock.
 *
 * @return  the close price of this stock.
 */
public double  getLastPrice()  {

return  this.lastPrice;
}

/**
 * Returns a {@link String} with the stock info in a xml format
 *
 * @return  the newly created {@link String} with the stock info
 */
public String  getxml()  {

/* Line separator */
String NEW_LINE = System.getProperty(“line.separator“);

return  “
+ NEW_LINE
+ “     “+ getSymbol() + “ 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-01-21 18:00  SSD3-Answers\
     文件       53285  2016-01-21 17:53  SSD3-Answers\SSD3-Multiple-Choice.CHM
     目录           0  2010-10-08 17:12  SSD3-Answers\SSD3答案\
     目录           0  2016-01-21 18:00  SSD3-Answers\SSD3答案\exam1\
     文件       91629  2008-01-06 22:03  SSD3-Answers\SSD3答案\exam1\EmployeeInformationSystem.jpg
     文件       12800  2016-01-21 18:00  SSD3-Answers\SSD3答案\exam1\Thumbs.db
     目录           0  2016-01-21 16:46  SSD3-Answers\SSD3答案\exam1\stock\
     文件        3384  2008-01-05 13:56  SSD3-Answers\SSD3答案\exam1\stock\Stock.java
     文件        1878  2008-01-05 14:37  SSD3-Answers\SSD3答案\exam1\stock\StockApplication.java
     目录           0  2016-01-21 16:46  SSD3-Answers\SSD3答案\exam1\weather方法1\
     文件        2175  2008-01-05 15:05  SSD3-Answers\SSD3答案\exam1\weather方法1\Weather.java
     文件        2566  2008-01-06 10:12  SSD3-Answers\SSD3答案\exam1\weather方法1\WeatherApplication.java
     目录           0  2016-01-21 16:46  SSD3-Answers\SSD3答案\exam1\weather方法2:数组解决\
     文件        2681  2008-01-06 10:17  SSD3-Answers\SSD3答案\exam1\weather方法2:数组解决\WeatherApplication.java
     目录           0  2016-01-21 16:46  SSD3-Answers\SSD3答案\exam2\
     文件         543  2008-01-04 22:26  SSD3-Answers\SSD3答案\exam2\AudioFile.java
     文件         905  2008-01-04 22:58  SSD3-Answers\SSD3答案\exam2\MediaDatabase.java
     文件          55  2008-01-04 22:17  SSD3-Answers\SSD3答案\exam2\MediaFile.java
     文件        4107  2008-01-04 22:10  SSD3-Answers\SSD3答案\exam2\student-files.zip
     目录           0  2016-01-21 16:46  SSD3-Answers\SSD3答案\exercise1\
     文件         934  2006-01-10 16:51  SSD3-Answers\SSD3答案\exercise1\Product.class
     文件        1135  2006-01-10 16:51  SSD3-Answers\SSD3答案\exercise1\ShoppingCart.class
     文件        2652  2007-12-31 22:03  SSD3-Answers\SSD3答案\exercise1\ShoppingCartApplication.class
     文件        2531  2007-12-31 22:02  SSD3-Answers\SSD3答案\exercise1\ShoppingCartApplication.java
     目录           0  2016-01-21 16:46  SSD3-Answers\SSD3答案\exercise1\要求与所需文件\
     文件      126561  2007-12-20 19:56  SSD3-Answers\SSD3答案\exercise1\要求与所需文件\Exercise1.pdf
     文件         934  2006-01-10 16:51  SSD3-Answers\SSD3答案\exercise1\要求与所需文件\Product.class
     文件        1135  2006-01-10 16:51  SSD3-Answers\SSD3答案\exercise1\要求与所需文件\ShoppingCart.class
     文件        2702  2007-12-23 04:04  SSD3-Answers\SSD3答案\exercise1\要求与所需文件\ShoppingCartApplication.class
     文件        3435  2007-12-20 19:55  SSD3-Answers\SSD3答案\exercise1\要求与所需文件\exe-shopping-cart.jar
     文件        6522  2007-12-20 19:56  SSD3-Answers\SSD3答案\exercise1\要求与所需文件\student-files.zip
............此处省略107个文件信息

评论

共有 条评论