Download Algorithm_project/Case_module/src/Case1_package/GirlFriend.java from zxy0307/Java: direct link, hf CLI and curl.
- Browser
- Download file 966 Bytes
-
https://huggingface.co/zxy0307/Java/resolve/main/Algorithm_project/Case_module/src/Case1_package/GirlFriend.java
- Command line
-
hf download hf://zxy0307/Java/Algorithm_project/Case_module/src/Case1_package/GirlFriend.java
-
curl -L -o GirlFriend.java https://huggingface.co/zxy0307/Java/resolve/main/Algorithm_project/Case_module/src/Case1_package/GirlFriend.java
966 Bytes
| package Case1_package; | |
| public class GirlFriend { | |
| //要求1:属性有姓名、年龄、身高。 | |
| private String name; | |
| private int age; | |
| private double height; | |
| public GirlFriend(String name, int age, double height) { | |
| this.name = name; | |
| this.age = age; | |
| this.height = height; | |
| } | |
| public GirlFriend() { | |
| } | |
| public String getName() { | |
| return name; | |
| } | |
| public void setName(String name) { | |
| this.name = name; | |
| } | |
| public int getAge() { | |
| return age; | |
| } | |
| public void setAge(int age) { | |
| this.age = age; | |
| } | |
| public double getHeight() { | |
| return height; | |
| } | |
| public void setHeight(double height) { | |
| this.height = height; | |
| } | |
| public String toString() { | |
| return "GirlFriend{" + | |
| "name='" + name + '\'' + | |
| ", age=" + age + | |
| ", height=" + height + | |
| '}'; | |
| } | |
| } | |