java 用户输入参数_java (1)设计一个程序,用于根据用户输入的命令行参数数量来计算 联合开发网 - pudn.com...

java

所属分类:Windows编程

开发工具:Java

文件大小:7KB

下载次数:15

上传日期:2007-10-25 15:38:06

上 传 者:肖俊琴

说明:  (1)设计一个程序,用于根据用户输入的命令行参数数量来计算长方形、正方形、三角形的面积。如果输入的参数为一个、二个、三个则它们应分别对应正方形、长方形、三角形,如果没有参数,则通过异常处理方法现实错误消息。(用于计算面积的方法是一个重载的方法。提示:定义一个抽象的父类,并提供一个抽象的方法area(). 再派生出三个子类,重写area()方法,然后在main方法中用多态来实现具体的面积函数的调用)。

((1) design a program for user input in accordance with the command-line parameters to calculate the number of rectangular, square, triangle area. If you enter the parameters for one, two, three, respectively, they should correspond to a square, rectangle, triangle, if there is no parameter by abnormal way to deal with the reality error message. (The method used to calculate the area is an overloaded method. NOTE: the definition of an abstract parent class, and provide an abstract method area (). Send another give birth to three sub-categories, rewriting area () method, and then in the main polymorphic methods used to achieve a specific area of function calls).)

文件列表:[举报垃圾]

java

....\2.doc

近期下载者:

相关文件:

收藏者:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值