资源简介
SSD3 quiz exercise exam 所有完整答案
基本90+的分数
代码片段和文件信息
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() + “
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 91629 2010-04-10 17:58 SSD3答案\exam1\EmployeeInformationSystem.jpg
文件 3384 2010-04-10 17:58 SSD3答案\exam1\stock\Stock.java
文件 1878 2010-04-10 17:58 SSD3答案\exam1\stock\StockApplication.java
文件 2175 2010-04-10 17:58 SSD3答案\exam1\weather方法1\Weather.java
文件 2566 2010-04-10 17:58 SSD3答案\exam1\weather方法1\WeatherApplication.java
文件 2681 2010-04-10 17:58 SSD3答案\exam1\weather方法2:数组解决\WeatherApplication.java
文件 543 2010-04-10 17:58 SSD3答案\exam2\AudioFile.java
文件 905 2010-04-10 17:58 SSD3答案\exam2\MediaDataba
文件 55 2010-04-10 17:58 SSD3答案\exam2\MediaFile.java
文件 4107 2010-04-10 17:58 SSD3答案\exam2\student-files.zip
文件 6584 2011-05-18 12:21 SSD3答案\Exam3\AddressBookGUI.java
文件 934 2010-04-10 17:57 SSD3答案\exercise1\Product.class
文件 1135 2010-04-10 17:57 SSD3答案\exercise1\ShoppingCart.class
文件 2652 2010-04-10 17:57 SSD3答案\exercise1\ShoppingCartApplication.class
文件 2531 2010-04-10 17:57 SSD3答案\exercise1\ShoppingCartApplication.java
文件 3435 2010-04-10 17:57 SSD3答案\exercise1\要求与所需文件\exe-shopping-cart.jar
文件 126561 2010-04-10 17:57 SSD3答案\exercise1\要求与所需文件\Exercise1.pdf
文件 934 2010-04-10 17:57 SSD3答案\exercise1\要求与所需文件\Product.class
文件 1135 2010-04-10 17:58 SSD3答案\exercise1\要求与所需文件\ShoppingCart.class
文件 2702 2010-04-10 17:58 SSD3答案\exercise1\要求与所需文件\ShoppingCartApplication.class
文件 6522 2010-04-10 17:58 SSD3答案\exercise1\要求与所需文件\student-files.zip
..A.SH. 9216 2010-07-02 14:52 SSD3答案\exercise2\Thumbs.db
文件 175707 2010-04-10 17:57 SSD3答案\exercise2\uml-gou-cof.jpg
文件 104772 2010-04-10 17:57 SSD3答案\exercise2\要求与所需文件\Exercise2.pdf
文件 9858 2010-04-10 17:57 SSD3答案\exercise2\要求与所需文件\gourmet-coffee-sample-executable.jar
文件 1144 2010-04-10 17:57 SSD3答案\exercise3\Coffee.java
文件 783 2010-04-10 17:57 SSD3答案\exercise3\CoffeeBrewer.java
文件 596 2010-04-10 17:57 SSD3答案\exercise3\OrderItem.java
文件 690 2010-04-10 17:57 SSD3答案\exercise3\Product.java
文件 131185 2010-04-10 17:57 SSD3答案\exercise3\要求与所需文件\Exercise3.pdf
............此处省略229个文件信息
- 上一篇:DELPHI数据库课程设计
- 下一篇:OpenGL飞机飞行模拟
相关资源
- Mathematical Statistics Exercises and Solution
- SSD3 全部答案
- SSD4 Exercise全部答案
- One thousand exercises in probability
- SSD3 全部练习和答案原创参考
- 吴恩达-深度学习-神经网络与深度学习
- ssd6答案和电子书
- 数据库系统概念第六版习题全部答案
- SSD6全部Exercise答案
- weights_SSD300.hdf5
- 吴恩达-深度学习-改善深层神经网络课
- ssd3 practical quiz 8
- SSD7 所有习题答案完美版
- storyline 2 Quizmaker13测试题批量导入模板
- ssd3 Practical Quiz 5 答案
- ssd6 exercise5
- SSD7 练习10标准答案
- A first book of Ansi C Solutions to Exercises (
- SSD3所有exercise答案
- ssd7 exercise5 老师给的答案
- 新版ssd3 quiz 3
- ssd7 exercise10 完整答案
- ssd7 exercise7 完整答案
- SSD6-EXERCISE6
- SSD7 exercise5 答案
- Programming with Transactions SSD7Programming
- SSD3 exercise5 答案 保证正确
- ssd3 的所有的exercise答案 和exam 答案
- SSD7 exercise6
- ssd7 exercise7
评论
共有 条评论