forked from txs72/JavaTutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGeometricObject.java
More file actions
executable file
·63 lines (59 loc) · 1.58 KB
/
GeometricObject.java
File metadata and controls
executable file
·63 lines (59 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* */ package ch13;
import java.util.Date;
/* */
/* */ public abstract class GeometricObject {
/* 4 */ private String color = "white";
/* */
/* */ private boolean filled;
/* */ private Date dateCreated;
/* */
/* */ protected GeometricObject() {
/* 10 */ this.dateCreated = new Date();
/* */ }
/* */
/* */
/* */ protected GeometricObject(String color, boolean filled) {
/* 15 */ this.dateCreated = new Date();
/* 16 */ this.color = color;
/* 17 */ this.filled = filled;
/* */ }
/* */
/* */
/* */ public String getColor() {
/* 22 */ return this.color;
/* */ }
/* */
/* */
/* */ public void setColor(String color) {
/* 27 */ this.color = color;
/* */ }
/* */
/* */
/* */
/* */ public boolean isFilled() {
/* 33 */ return this.filled;
/* */ }
/* */
/* */
/* */ public void setFilled(boolean filled) {
/* 38 */ this.filled = filled;
/* */ }
/* */
/* */
/* */ public Date getDateCreated() {
/* 43 */ return this.dateCreated;
/* */ }
/* */
/* */
/* */ public String toString() {
/* 48 */ return "created on " + this.dateCreated + "\ncolor: " + this.color + " and filled: " + this.filled;
/* */ }
/* */
/* */ public abstract double getArea();
/* */
/* */ public abstract double getPerimeter();
/* */ }
/* Location: /Volumes/TXS.128G/hope useful/practice/2020.jar!/ch13/GeometricObject.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/