资源简介
卡耐基 SSD3答案(全 eaxm+qiuz+excerise)
代码片段和文件信息
import java.io.*;
/**
* objects of this class store stock information for a company.
* The following information is stored.
*
* - the Dow Jones symbol for the company a
String
.
* - the name of the company a
String
.
* - the highest price reached during the course of the day
* a double
* - the lowest price reached during the course of the day
* a double
* - the last trading price recorded when the market closed on the day
* a double
*
*
* @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() + “
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2674 2007-12-24 21:38 SSD3答案\quiz9\Employee.java
文件 88041 2007-12-20 20:42 SSD3答案\quiz9\要求与所需文件\Practical Quiz 9.pdf
文件 8831 2007-12-20 20:41 SSD3答案\quiz9\要求与所需文件\student-files.zip
文件 108 2008-01-04 13:35 SSD3答案\quiz8\DVD.java
文件 773 2008-01-04 13:35 SSD3答案\quiz8\DVDMovie.java
文件 529 2008-01-04 13:01 SSD3答案\quiz8\Movie.java
文件 77 2008-01-04 13:12 SSD3答案\quiz8\VHS.java
文件 588 2008-01-04 13:35 SSD3答案\quiz8\VHSMovie.java
文件 177549 2007-12-20 20:37 SSD3答案\quiz8\要求与所需文件\Practical Quiz 8.pdf
文件 5695 2007-12-20 20:35 SSD3答案\quiz8\要求与所需文件\student-files.zip
文件 2512 2008-01-03 16:39 SSD3答案\quiz7\Student.java
文件 5701 2008-01-03 17:18 SSD3答案\quiz7\StudentArrayList.java
文件 9785 2008-01-03 16:40 SSD3答案\quiz7\TestStudentArrayList.java
文件 91163 2007-12-20 20:19 SSD3答案\quiz7\要求与所需文件\Practical Quiz 7.pdf
文件 8078 2007-12-20 20:20 SSD3答案\quiz7\要求与所需文件\student-files.zip
文件 1934 2008-01-03 15:29 SSD3答案\quiz6\Employee.java
文件 5570 2008-01-03 16:32 SSD3答案\quiz6\EmployeeArray.java
文件 9231 2008-01-03 15:30 SSD3答案\quiz6\TestEmployeeArray.java
文件 89155 2007-12-20 20:12 SSD3答案\quiz6\要求与所需文件\Practical Quiz 6.pdf
文件 7710 2007-12-20 20:24 SSD3答案\quiz6\要求与所需文件\student-files.zip
文件 2910 2008-01-01 23:30 SSD3答案\quiz5\TestAthleteScores.java
文件 71247 2007-12-20 20:10 SSD3答案\quiz5\要求与所需文件\Practical Quiz 5.pdf
文件 1658 2007-12-20 20:10 SSD3答案\quiz5\要求与所需文件\student-files.zip
文件 95978 2008-01-06 16:34 SSD3答案\quiz4\uml-customer-system.jpg
文件 74207 2007-12-20 20:01 SSD3答案\quiz4\要求与所需文件\Practical Quiz 4.pdf
文件 39162 2008-01-06 13:19 SSD3答案\quiz3\AnimalsClassDiagram.jpg
文件 115019 2008-01-06 12:59 SSD3答案\quiz3\ComputerClassDiagram.jpg
文件 76945 2007-12-20 19:59 SSD3答案\quiz3\要求与所需文件\Practical Quiz 3.pdf
文件 4450 2007-12-31 21:05 SSD3答案\quiz2\DNASequence.java
文件 865 2007-12-20 19:33 SSD3答案\quiz2\要求与所需文件\DebuggingReport.txt
............此处省略109个文件信息
- 上一篇:nvm-setup.zip
- 下一篇:QPSK调制的FPGA实现源程序
相关资源
- 2889642计算机组成原理试卷及答案(唐
- 最优化理论与算法答案.rar
- 算法与数据结构考研试题精析1800习题
- CMOS模拟集成电路设计Allen 课后习题解
- Andrea Goldsmith无线通信课后题答案
- 现代控制理论第三版答案
- TCP/IP协议族第四版习题答案
- 数字图像处理冈萨雷斯第三版课后习
- 中国矿业大学数字逻辑习题答案上.
- 自动控制原理答案+夏德钤
- 数字信号处理 丁玉美 高西全 第二版
- 《复变函数论》张锦豪 邱维元版高等
- 应用随机过程答案毛用才
- 软件工程导论第六版课后习题答案
- 编译原理教材清华大学版答案
- 算法设计与分析基础Anany Levitin著,潘
- 北航数值分析课后习题详细答案
- an-introduction-to-optimization-4th-
- 微机原理与接口技术 中科大 周荷琴
- 数字信号处理吴镇扬的全部资料书后
- 信号与系统习题答案 于慧敏
- 数学模型参考答案,习题解答
- 集成电子技术基础下册数电答案
- 离散数学答案 机械工业出版社
- 微分几何 陈维桓答案
- 计算理论基础第二章课后习题解答
- 高频电子线路课后习题答案曾兴雯
- 工程数学《积分变换》第四版 课后答
- 矩阵论 方保镕 课后答案
- 信号系统课后题答案 王宝祥 主编
评论
共有 条评论