真急! ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄

hooligancheng 2003-10-19 07:45:43
谁有JBuilder9的注册码给GM一个谢了:)
...全文
39 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
LuZhou 2003-10-19
  • 打赏
  • 举报
回复
已经发了,请加分,呵呵。
hooligancheng 2003-10-19
  • 打赏
  • 举报
回复
我的我KING__CHENG@163。COM谢了:)
LuZhou 2003-10-19
  • 打赏
  • 举报
回复
我有,请给我你的email,我发给你。
或者到http://www.javapub.com:8000/home/home.jspa?categoryID=1下载。
实验指导书 实验名称:包、接口与异常处理 学时安排:2 实验类别:综合设计型实验 实验要求:1人1组  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ 一、实验目的 1、掌握java字符串处理方法。 2、掌握java面向对象的概念。 3、掌握java自定义异常和处理。 4、 通过实验,对Java程序的开发有一个深入了解。 二、实验内容 1.阅读并分析程序TestException.java。(见附件PPT文件) 2.设计一个程序,其功能是从命令行输入整数字符串,再将该整数字符串转换为整数, 输入的数据可能具有以下格式:12345、123 45、123xyz456 3.编写一个四则运算程序,要求用户输入一个x值和一个y值,以及一个四则运算符。如 果用户输入正确,则给出运算结果,如果输入错误,则给出出错警告。(利用异常处理 编程,尽量使用java现成的异常类,如没有可自定义异常类 ) 三、程序代码 1. public class TestException { public TestException() { } boolean testEx() throws Exception{ boolean ret = true; try{ ret = testEx1(); }catch (Exception e){ System.out.println("testEx, catch exception"); ret = false; throw e; } finally{ System.out.println("testEx, finally; return value="+ret); return ret; } } boolean testEx1() throws Exception{ boolean ret = true; try{ ret = testEx2(); if (!ret){ return false; } System.out.println("testEx1, at the end of try"); return ret; }catch (Exception e){ System.out.println("testEx1, catch exception"); ret = false; throw e; } finally{ System.out.println("testEx1, finally; return value="+ret); return ret; } } boolean testEx2() throws Exception{ boolean ret = true; try{ int b=12; int c; for (int i=2;i>=-2;i--){ c=b/i; System.out.println("i="+i); } return true; }catch (Exception e){ System.out.println("testEx2, catch exception"); ret = false; throw e; } finally{ System.out.println("testEx2, finally; return value="+ret); return ret; } } public static void main(String[] args) { TestException testException1 = new TestException(); try{ testException1.testEx(); }catch(Exception e){ e.printStackTrace(); } } } 2. import java.util.*; public class test { public static void main(String args[]) { int i, number=0; String str; try { for(i=0;i
浙江理工大学信息学院 面向对象程序设计实验报告 实验名称:类的多态性的实现 学时安排:3 实验类别:设计性实验 实验要求:1人1组 学号: 姓名:  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ 一、实验目的 1. 理解重载运算符的意义。 2. 掌握使用成员函数、友员函数重载运算符的特点。 3. 掌握重载运算符函数的调用方法。 4. 掌握动态联编的概念。 5. 掌握虚函数和纯虚函数的使用方法。 二、实验原理介绍 设计性实验 具体原理请见实验内容和步骤 实现对抽象类的继承,通过operator函数调用的形式,实现运算符的重载 三、实验设备介绍 软件需求: Windows或Linux下的C++编译器 硬件需求: 对于硬件方面的要求,建议配置是Pentium III 450以上的CPU处理器,64MB以上的内存,200MB的自由硬盘空间、CD- ROM驱动器、能支持24位真彩色的显示卡、彩色显示器、打印机。 四、实验内容 某公司的员工有经理Manager、技术人员Technicist和营销人员SalesPerson,他们的 薪金计算方法如下: 经理按月计酬,方法是:基本工资+奖金;技术人员按月计酬,方法是:基本工资;营销 人员按月计酬,方法是:基本工资+销售利润*5%。 每类人员都有职工编号、姓名、性别、入职时间、职位、基本工资等数据;各类人员使 用统一接口get_pay()计算各类人员的月薪,重载<<运算符实现员工信息的输出。其次, 设计一个统计并输出该公司员工当月薪金情况的报表类Report,该类提供insert接口向 Report类的容器中添加员工信息,并提供print接口用于展示以职位为单位的每个员工的 职工编号、姓名、性别、入职时间以及当月该员工的薪酬,并统计出该职位员工薪酬的 最高值和最低值。为了提供更方便的查找功能,请为Report类重载[]运算符,下标值为 职位,能根据职位信息查找出所有符合该职位的员工。在主函数中对实现的类进行测试 ,首先,创建各类人员对象,通过Report类的insert接口向报表中添加这些人员信息, 然后通过Report类的print接口输出当月员工薪酬情况报表。 五 程序清单 #include #include #include using namespace std; class Date{ public: int y, m, d; Date(int yy = 0, int mm = 0, int dd = 0) :y(yy), m(mm), d(dd){} friend istream& operator>>(istream &is, Date &p); friend ostream& operator<<(ostream &os, Date &p); }; class Employee{ protected: Date date; string employee_number; string employee_name; string employee_gender; string employee_position; double employee_basic_money; double prize[13]; public: virtual double getpay(int n) = 0; Date get_date(){ return date; } string get_number(){ return employee_number; } string get_name() { return employee_name; } string get_gender() { return employee_gender; } string get_position() { return employee_position; } double get_basic_money() { return employee_basic_money; } virtual void put(Date d, string e_num, string e_name, string e_g, string e_p, double e_m,double money[13]) = 0; }; class Manager :public Employee{ public: Manager(int a = 0, int b = 0, int c = 0, double d = -1){ Date date(a, b, c); employee_basic_money = d; for (int i = 0; i < 13; i++) pri

62,614

社区成员

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

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