This commit is contained in:
2022-03-19 17:47:52 +08:00
parent 6bf672bd5b
commit 1c8f95c4b3
35 changed files with 1597 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
/*
* AutoRobot: CHEN Yongyuan (Walter) 1930006025 from OOP(1007)
* Date: 2022-03-19
* Description: This is the class of LivingThing.
*/
public class LivingThing {
/**
* Name of the LivingThing.
*/
private String name;
/**
* Constructor of LivingThing.
*
* @param name Name of the LivingThing.
*/
public LivingThing(String name) {
this.name = name;
}
/**
* Get the name of the LivingThing.
*
* @return The name of the LivingThing.
*/
public String getName() {
return name;
}
/**
* Test.
*/
public static void testLiving() {
LivingThing living = new LivingThing("LivingThing");
System.out.println(living.getName() == "LivingThing");
}
}