小小的关于JAVA的问题~~

A198905011 2010-06-13 01:43:13
原问题:
InstrumentType.java
public enum InstrumentType {
GUITAR, BANJO, DOBRO, FIDDLE, BASS, MANDOLIN;
public String toString() {
switch(this) {
case GUITAR: return "Guitar";
case BANJO: return "Banjo";
case DOBRO: return "Dobro";
case FIDDLE: return "Fiddle";
case BASS: return "Bass";
case MANDOLIN: return "Mandolin";
default: return "Unspecified";
}
}
}


新要求:
Rick’s Instrument application is
changing. The new requirements list as
follows:
...全文
198 18 打赏 收藏 转发到动态 举报
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangfeiwoyun 2010-06-15
  • 打赏
  • 举报
回复
《Header First OOA&D》 ?
wangfeiwoyun 2010-06-15
  • 打赏
  • 举报
回复
楼主帖子内容我咋觉得是 header first 系列的风格呢?
落梨 2010-06-15
  • 打赏
  • 举报
回复
先祝大家端午节快乐 如果有一个即时翻译的软件 不就轻松许多 推荐 Lingoes-灵格斯
落梨 2010-06-15
  • 打赏
  • 举报
回复
我对程序看的不是太懂 但为了方便之后的人解答 我写出新要求的大体翻译
Rick’s Instrument application is
changing. The new requirements list as
follows:

里克的仪器应用正在发生变化。新规定名单如下:

Rick wants to track the sales information,
including which instruments have been sold
to which customer. Also, Rick needs to store
the contact information to customers.

里克要跟踪销售信息,包括已售出的仪器哪些客户。
此外,里克需要存储联系人信息的客户。


To boost sales, Rick want to find the
customers who have bought a certain
number of instruments from his shop and tell
them that they could buy later instruments at
a discount. Now the number is set to 3 and
the discount is 5% off the normal price.

为了促进销售,里克想找到客户的折扣有多少
谁从他的乐器店买了一些,并告诉他们,他们可以在购买后的文书。
现在,这一数字被设置为3,价格折扣为5%,离正常的。

So you, the application developer,
needs to help Rick to find which
customers could buy instruments at
discount. So Rick can contact with these
customers and tell them that they could
enjoy his favorable price terms for future
purchase.

所以,你的应用程序开发,需要帮助里克找到,
顾客可以买到打折乐器。所以里克可以接触这些客户,
并告诉他们,他们可以享受他对未来购买优惠的价格条款。

Based on the original solution, design the
application according to the new
requirements. Show your whole design in
a new class diagram.

根据原来的方案,设计了应用程序根据新的要求。
显示您的整个设计类图和一个新的类。

Then program the new application to
satisfy this new requirement and test it.

然后,新的应用程序来满足这一新要求并测试它。
  • 打赏
  • 举报
回复
真晕,要给你解决问题之前,还得给你翻译……
ronniegxq 2010-06-15
  • 打赏
  • 举报
回复
不懂英文的飘过帮顶
wangdbeyond 2010-06-14
  • 打赏
  • 举报
回复
非常佩服楼主的英语水平 建议楼主先把它翻译为中文 因为我们都有自己的事 不可能用很多时间来解决你的问题
zhanlang9075 2010-06-14
  • 打赏
  • 举报
回复

期望LZ早日解决问题 Good happy 过个好端午节^_^
zhanlang9075 2010-06-14
  • 打赏
  • 举报
回复
期望LZ早上解决问题 Good Luck 过个好端午节^_^
zhanlang9075 2010-06-14
  • 打赏
  • 举报
回复
[Quote=引用楼主 a198905011 的回复:]
原问题:
InstrumentType.java
public enum InstrumentType {
GUITAR, BANJO, DOBRO, FIDDLE, BASS, MANDOLIN;
public String toString() {
switch(this) {
case GUITAR: return "Guitar";
case BANJO: return "B……
[/Quote]
个人英语水平有限耶 这段英文要求是啥子意思咯。
A198905011 2010-06-14
  • 打赏
  • 举报
回复
没人会吗?
Qin_Tianxiang 2010-06-13
  • 打赏
  • 举报
回复
这也太kao'dei人了吧!
yan0426 2010-06-13
  • 打赏
  • 举报
回复
...大英文
yangjunsoft 2010-06-13
  • 打赏
  • 举报
回复
鄙视放洋屁滴!
qingyunzhuimeng 2010-06-13
  • 打赏
  • 举报
回复
Formbean.java
private String sBuyFlg = "";
private String sGuitar = "";
private String sBanjo= "";
private String sDobro= "";
private String sFiddle= "";
private String sBass= "";
private String sMandolin= "";
private String sCustomerName = "";
private String sCustomerPhone ="";
把这些做成set/get方法
InstrumentType.java
修改这个方法toString();
将相应的值放到FormBean里
同时设置sBuyFlg值,记录Custom是第几次来买
并且把相应的Custom信息设置好
再加一个方法,判断是否打折就可以了(sBuyFlg 和 Custom相关信息)
izard999 2010-06-13
  • 打赏
  • 举报
回复
LZ是题目犯愁还是那一串英语犯愁?
Java技术栈 2010-06-13
  • 打赏
  • 举报
回复
先翻译英文了再来做题。。
shine333 2010-06-13
  • 打赏
  • 举报
回复
The entire problem, IMHO, has nothing to do with the enum class you typed here. Anything else you can provide?

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧