摘要: 阅读全文
posted @ 2020-08-31 14:39 csy521 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 1.package finish; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; public class csy { public static vo 阅读全文
posted @ 2020-06-17 16:17 csy521 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 把多个企鹅的信息添加到集合中查看企鹅的数量及所有企鹅的信息删除集合中部分企鹅的元素判断集合中是否包含指定企鹅package finish; import java.util.ArrayList; public class finish { public static void main(String 阅读全文
posted @ 2020-06-03 13:26 csy521 阅读(130) 评论(0) 推荐(0) 编辑
摘要: package finish; import java.util.Random; public class finish{ public static void main(String[] args) { // TODO Auto-generated method stub Random r = n 阅读全文
posted @ 2020-05-28 16:29 csy521 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 1.package finish; public class finish { public static void main(Str 2.package finish; import java.util.Random; public class finish { public static voi 阅读全文
posted @ 2020-05-27 12:04 csy521 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 1、设计四个类,分别是:(知识点:抽象类及抽象方法) (1)Shape表示图形类,有面积属性area、周长属性per,颜色属性color,有两个构造方法(一个是默认的、一个是为颜色赋值的),还有3个抽象方法,分别是:getArea计算面积、getPer计算周长、showAll输出所有信息,还有一个求 阅读全文
posted @ 2020-05-21 11:33 csy521 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 4、Cola公司的雇员分为以下若干类:(知识点:多态) (1) ColaEmployee :这是所有员工总的父类,属性:员工的姓名,员工的生日月份。 方法:getSalary(int month) 根据参数月份来确定工资,如果该月员工过生日,则公司会额外奖励100 元。 (2) SalariedEm 阅读全文
posted @ 2020-05-20 11:38 csy521 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 1.(1) 2.(1)package finish; public abstract class finish { protected double area;// 面积 protected double per;// 周长 protected String color;// 颜色 public f 阅读全文
posted @ 2020-05-14 11:01 csy521 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1.package finish; class Student{ String name=new String("该学生还未命名"); //姓名 double achievement; //成绩 public Student(){ //无参构造方法 } public Student(String s 阅读全文
posted @ 2020-05-07 11:41 csy521 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1.package asdd; public class sasa { int x; int y; public Point() {} public Point(int x0,int y0){ this.x=x0; this.x=y0; } public void movePoint(int dx, 阅读全文
posted @ 2020-04-30 13:30 csy521 阅读(148) 评论(0) 推荐(0) 编辑