{"id":28700467,"url":"https://github.com/zhanwen/coursetest","last_synced_at":"2025-07-22T10:33:03.509Z","repository":{"id":108163597,"uuid":"60883934","full_name":"zhanwen/CourseTest","owner":"zhanwen","description":"Java练习","archived":false,"fork":false,"pushed_at":"2016-06-18T15:43:32.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-06T17:48:29.199Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhanwen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-06-11T00:22:00.000Z","updated_at":"2016-06-18T15:43:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3f1562c-4745-4d96-8fec-1c3c4c6ed7b6","html_url":"https://github.com/zhanwen/CourseTest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhanwen/CourseTest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanwen%2FCourseTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanwen%2FCourseTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanwen%2FCourseTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanwen%2FCourseTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhanwen","download_url":"https://codeload.github.com/zhanwen/CourseTest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhanwen%2FCourseTest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266475245,"owners_count":23934918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-14T11:07:45.095Z","updated_at":"2025-07-22T10:33:03.502Z","avatar_url":"https://github.com/zhanwen.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CourseTest\n**1、有一个类**\n```  \nclass Point {  \n\tint x, y; \n\tPoint (int a, int b) {\n\t\tsetPoint(a, b);\n\t}\n\tpublic void setPoint (int a, int b) {\n\t\tx = a;\n\t\ty = b;\n\t}\n}\n```\n编写一个这个类的子类`circle`,它的两个成员变量是`Point`的两个对象，一个作为圆心，另一个表示圆周上的一点，成员函数是`CalErea`，返回该圆的面积。在编写一个测试类，计算2个这样的圆的面积并输出。\n\n**2、定义了一个接口**\n```\ninterface ClassSort {\n\tint ScoreSort(); \\\\成绩排序并输出\n\tvoid ScoreLevel(); \\\\等级输出\n}\n```\n现有两个类`ChineseCourse`和`MathCourse`，成员变量都是ID[](学生学号)和Score[](学生Score成绩),这两个类均实现`ClassSort`接口,`ScoreSort()`和\n`ScoreLevel()`,其中，`ChineseCourse`类以成绩降序排序并输出，`MathCourse`中以成绩升序排序并输出，等级分别以A、B、C、D、E输出和以优、良、中、及格、不及格输出，完成这几个类的编码，并写出测试类。\n\n**3、按以下要求编写程序**  \n\n(1)编写`Animal`接口，接口中声明`run()`方法\n(2)定义`Bird`类和`Fish`类实现`Animal`接口，要求至少一个一个输出串的语句\n(3)编写`Bird`类和`Fish`类的测试程序，并调用其中的`run()`方法，并把`Bird`类和`Fish`类中的输出串保存到一个文本文件中\n\n**4、复数计算**  \n\n定义一个复数类`Complex`和一个类`ComAdd`，`ComAdd`类中有一个`Add()`方法，可以返回两个复数相加的功能，在定义一个类`ComThreeAdd`实现继承`ComAdd`类，实现三个复数相加，写一个测试类，实现n个复数的相加，n个复数的实部和虚部由随机数产生\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhanwen%2Fcoursetest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhanwen%2Fcoursetest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhanwen%2Fcoursetest/lists"}