/* * 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"); } }