{"id":967,"date":"2023-09-26T09:01:53","date_gmt":"2023-09-26T01:01:53","guid":{"rendered":"https:\/\/swordofmorning.com\/?p=967"},"modified":"2025-10-09T13:55:18","modified_gmt":"2025-10-09T05:55:18","slug":"android-development-03","status":"publish","type":"post","link":"https:\/\/swordofmorning.com\/index.php\/2023\/09\/26\/android-development-03\/","title":{"rendered":"Android Development 03 Challenge 3"},"content":{"rendered":"<p><center>\u53c2\u8003\u89c6\u9891\uff1a<a href=\"https:\/\/www.youtube.com\/watch?v=fis26HvvDII&t=3601s\" target=\"_blank\"  rel=\"nofollow\" >Android Development for Beginners - Full Course<\/a><\/center><\/p>\n<p>&emsp;&emsp;\u672c\u7bc7\u5185\u5bb9\u4e3b\u8981\u4e3aJava OOP\u3002<\/p>\n<pre><code class=\"language-java\">public class Organ\n{\n\/* Member *\/\n    private String m_name;\n\n\/* Function *\/\n    public Organ(String p_name)\n    {\n        this.m_name = p_name;\n    }\n\n    public String getName()\n    {\n        return this.m_name;\n    }\n}\n\npublic class Eyes extends Organ\n{\n\/* Member *\/\n    private String m_color;\n\n\/* Function *\/\n    public Eyes (String p_name, String p_color)\n    {\n        super(p_name);\n        this.m_color = p_color;\n    }\n\n    public String getColor()\n    {\n        return this.m_color;\n    }\n}\n\npublic class Heart extends Organ\n{\n\/* Member *\/\n    private int m_HR;\n\n\/* Function *\/\n    public Heart(String p_name, int p_HR)\n    {\n        super(p_name);\n        this.m_HR = p_HR;\n    }\n\n    public int getHR()\n    {\n        return this.m_HR;\n    }\n}\n\npublic class Human\n{\n\/* Member *\/\n    String m_name;\n    Heart m_heart;\n    Eyes m_eyes;\n\n\/* Function *\/\n\n    Human(String p_name, Heart p_heart, Eyes p_eyes)\n    {\n        this.m_name = p_name;\n        this.m_heart = p_heart;\n        this.m_eyes = p_eyes;\n    }\n\n    public void PrintInfo()\n    {\n        System.out.println(&quot;This is: &quot; + this.m_name + &quot;, who&#039;s eye&#039;s color is: &quot; + this.m_eyes.getColor() + &quot;, and HR is: &quot; + this.m_heart.getHR());\n    }\n}\n\npublic class Main\n{\n    public static void main(String[] args)\n    {\n        Human ZS = new Human(&quot;ZS&quot;, new Heart(&quot;Heart&quot;, 60), new Eyes(&quot;Eyes&quot;, &quot;Black&quot;));\n\n        ZS.PrintInfo();\n    }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\u89c6\u9891\uff1aAndroid Development for Beginners &#8211; Full Course &emsp;&emsp; &#823","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/swordofmorning.com\/index.php\/wp-json\/wp\/v2\/posts\/967"}],"collection":[{"href":"https:\/\/swordofmorning.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swordofmorning.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swordofmorning.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swordofmorning.com\/index.php\/wp-json\/wp\/v2\/comments?post=967"}],"version-history":[{"count":2,"href":"https:\/\/swordofmorning.com\/index.php\/wp-json\/wp\/v2\/posts\/967\/revisions"}],"predecessor-version":[{"id":969,"href":"https:\/\/swordofmorning.com\/index.php\/wp-json\/wp\/v2\/posts\/967\/revisions\/969"}],"wp:attachment":[{"href":"https:\/\/swordofmorning.com\/index.php\/wp-json\/wp\/v2\/media?parent=967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swordofmorning.com\/index.php\/wp-json\/wp\/v2\/categories?post=967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swordofmorning.com\/index.php\/wp-json\/wp\/v2\/tags?post=967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}