资源简介
大学学习java SSD3的标准答案。
exam1
exam2
exercise1
exercise2
exercise3
exercise4
...................
代码片段和文件信息
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
----------- --------- ---------- ----- ----
91629 1
相关资源
- Java Web项目开发案例精粹14新闻发布系
- 固定资产管理系统jsp+servlet+javabean
- 《数字图像处理—Java编程与实验》配
- 自己开发的一个音乐网站
- javaweb文章发布系统
- JAVA支付宝手机网站支付案例
- 兰大马俊范玫java实验课所有代码
- java聊天程序:可实现私聊、公聊、截
- VISSIM二次开发案例与框架VBA,C++,M
- javaweb的服务端数据接口开发
- spark2.1.0.chmspark java API
- java小型论坛课程设计代码
- Java数据库课程设计
- Thinking in Java 4 源码 导入IDEA可直接运
- Hibernate的jar包
- java编写的算符优先分析法分析器
- JAVA网络编程技术与实践-清华大学出版
- courseCode-java_mldn-master.zip
- Java拼图小游戏程序代码及实验报告
- 基于Java代码的USB摄像头采集与显示
- javaweb 写的用户登录注册的采用mvc模式
- Java代码实现两级联动
- 用于验证码识别的Jmeter插件
- 航空售票管理信息系统内含数据库文
- 纯Java音乐共享平台
- Java编写的简单的图书管理系统(增删
- 自己开发的消灭星星android-java源代码
- 《JAVA数据库系统开发案例精选》之图
- Java综合性实验----------
- 云笔记项目---Myeclipse完整版
评论
共有 条评论