登录
首页 » 其他项目 » (1) 设计一个程序,用于根据用户输入的命令行参数数量来计算长方形、正方形、三角形的面积。如果输入的参数为一个、二个、三个则它们应分别对应正方形、长方形、三角形...

(1) 设计一个程序,用于根据用户输入的命令行参数数量来计算长方形、正方形、三角形的面积。如果输入的参数为一个、二个、三个则它们应分别对应正方形、长方形、三角形...

于 2022-07-11 发布 文件大小:4.63 kB
0 63
下载积分: 2 下载次数: 1

代码说明:

(1) 设计一个程序,用于根据用户输入的命令行参数数量来计算长方形、正方形、三角形的面积。如果输入的参数为一个、二个、三个则它们应分别对应正方形、长方形、三角形,如果没有参数,则通过异常处理方法现实错误消息。(用于计算面积的方法是一个重载的方法。提示:定义一个抽象的父类,并提供一个抽象的方法area(). 再派生出三个子类,重写area()方法,然后在main方法中用多态来实现具体的面积函数的调用)。-(1) design a program based on user input for the command line parameters to calculate the number of rectangular, square, triangle area. If the input parameter is one, two, three then they should correspond to a square, rectangle, triangle, without parameters, exception handling through the real error message. (Used to calculate the area is an overloaded method. Note: the definition of an abstract parent class, and provides an abstract method area (). To send birth to three sub-classes override area () method, and then in main method using multi-state to achieve a specific area of a function call).

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 纽约大学的tinylinker代码
    小型链接器,系统级编程课程设计,题目要求编写两个函数-A small linker, system-level programming course design。 You are to implement a two-pass linker in C, C++, or Java and submit the source code, which we will compile and run. The target machine is word addressable and has a memory of 600 words, each consisting of 4 decimal digits. The first (leftmost) digit is the opcode, which is unchanged by the linker
    2022-08-23 17:14:33下载
    积分:1
  • 动态创建控件举例
    动态创建控件举例-Dynamic Controls for the creation
    2022-07-08 14:07:24下载
    积分:1
  • Map editor is very powerful game editor, source code is worth a look
    地图编辑器 很强大的游戏编辑器源码值得-Map editor is very powerful game editor, source code is worth a look
    2022-09-01 02:50:03下载
    积分:1
  • Floyd算法,推荐
    Floyd算法,推荐-Floyd algorithm, recommended clamor clamor clamor clamor clamor
    2022-06-12 15:50:27下载
    积分:1
  • 此代码为在.net环境下 用c#进行数据库编程的核心功能代码 希望对网友们又帮助...
    此代码为在.net环境下 用c#进行数据库编程的核心功能代码 希望对网友们又帮助-in this code. Net environment with a database c# programming code of the core functions of the website hope it helped
    2023-07-10 04:15:02下载
    积分:1
  • on the transverse mode of the electromagnetic wave, can be used to increase thei...
    关于bragg光纤的电磁波横模的计算,用其可以给加好的了解bragg的模式特性-on the transverse mode of the electromagnetic wave, can be used to increase their understanding of good characteristics of the model bragg
    2022-03-30 06:38:57下载
    积分:1
  • 这是用C++编写的程序,可以实现多式的求和。
    这是用C++编写的程序,可以实现多项式的求和。-C preparation procedures can be achieved polynomial summation.
    2023-04-12 02:05:04下载
    积分:1
  • 用java实现的LinkedList二叉树,内有测试文件。
    用java实现的LinkedList二叉树,内有测试文件。-used to achieve the LinkedList binary tree, which is testing documents.
    2023-04-14 10:05:03下载
    积分:1
  • Lotus security
    Lotus安全性增强软件,是我毕业设计作品。能够监视数据库文档的修改变动。-Lotus security-enhanced software, design work is my graduation. Able to monitor movements to amend the document database.
    2022-03-04 11:26:43下载
    积分:1
  • multi
    多用户系统,用户可拥有自己的音乐盒,每个音乐盒可以收藏歌曲20条,采用优化的网站结构,使数据库查询更合理,服务器占用资源更少,暂时无后台功能,将在更新版中推后后台功能 用户名:polo 密码:111111 -multi-user system, users can have their own music boxes, each music box collection 20 songs, using the optimum structure of the website so that more reasonable database query, the server occupied fewer resources, but no background functions, the updated version will be pushed after background function Username : Password polo : 111111
    2022-01-25 20:03:29下载
    积分:1
  • 696524资源总数
  • 103938会员总数
  • 55今日下载