package zhongqiuzuoye; //自己写的方法 public class Rect { public double width; public double height; Rect(double width,double height) //带有两个参数的构造方法,用于将width和height属性初化; { this.width=width; this.height=height; } Rect() //不带参数的构造方法,将矩形初始化为宽和高都为10. { width=10
好久没写过博客了,这学期不是很有热情去写博客,写过的题也懒得写题解.现在来水一水博客,写一下若干年前的题目的题解. Atlantis Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 21978 Accepted Submission(s): 8714 Problem Description There are several anc
Area Coverage Time Limit: 10000ms, Special Time Limit:2500ms, Memory Limit:65536KB Total submit users: 16, Accepted users: 12 Problem 12884 : No special judgement Problem description In this day and age, a lot of the spying on other countries is done
Atlantis Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11777 Accepted Submission(s): 4983 Problem Description There are several ancient Greek texts that contain descriptions of the fabled
// 图形类Shape package d922B; public class Shape { double getArea(ShapePara x){ return x.getArea(); } double getArea(Rect y) { return y.getA()*y.getB(); } } //矩形类 package d922B; public class Rect extends Shape { private double a, b; public Rect(double a
package com.hanqi.test; public class Rect { ; ; public double getWidth() { return width; } public void setWidth(double width) { this.width = width; } public double getHeight() { return height; } public void setHeight(double height) { this.height = he