提交 b9fe51f7 编写于 作者: M Mars Liu

修复结构问题

上级 8aa9eefd
{ {
"type": "code_options", "type": "code_options",
"author": "熊克斐", "author": "熊克斐",
"source": "runtime.md", "source": "classpath.md",
"notebook_enable": false, "notebook_enable": false,
"exercise_id": "0e973b33770c401d9acb4fb1b39b3795" "exercise_id": "0e973b33770c401d9acb4fb1b39b3795"
} }
\ No newline at end of file
# 类和类型 # 类和类型
## aop
### template
```java
public class Main {
static class Human {
String label;
public String getLabel() {
return "Human";
}
}
static class Employee extends Human{
public String getLabel() {
return "$code";
}
}
public static void main(String[] args) throws IOException {
Human joe = new Employee();
System.out.println(joe);
}
}
```
我们有两个类型: 我们有两个类型:
```java ```java
...@@ -50,6 +25,30 @@ Human joe = new Employe(...) ...@@ -50,6 +25,30 @@ Human joe = new Employe(...)
调用 `joe.getLable()` 的时候,返回的是? 调用 `joe.getLable()` 的时候,返回的是?
## template
```java
public class Main {
static class Human {
String label;
public String getLabel() {
return "Human";
}
}
static class Employee extends Human{
public String getLabel() {
return "$code";
}
}
public static void main(String[] args) throws IOException {
Human joe = new Employee();
System.out.println(joe);
}
}
```
## 答案 ## 答案
Employee Employee
......
{ {
"type": "code_options", "type": "code_options",
"author": "熊克斐", "author": "熊克斐",
"source": "autocrease.md", "source": "autoincrease.md",
"exercise_id": "45918535c9fc463494b4c8854b85e89d", "exercise_id": "45918535c9fc463494b4c8854b85e89d",
"notebook_enable": false "notebook_enable": false
} }
\ No newline at end of file
...@@ -35,7 +35,7 @@ public class Counter{ ...@@ -35,7 +35,7 @@ public class Counter{
} }
``` ```
## 答案 ## 选项
### A ### A
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"children": [], "children": [],
"export": [ "export": [
"map.json", "map.json",
"sum.json" "sum.json",
"filter.json"
] ]
} }
\ No newline at end of file
{ {
"type": "code_options", "type": "code_options",
"author": "刘鑫", "author": "刘鑫",
"source": "double.md", "source": "filter.md",
"notebook_enable": false "notebook_enable": false,
"exercise_id": "d212f961d7974424a174802c62ae8526"
} }
\ No newline at end of file
{ {
"type": "code_options", "type": "code_options",
"author": "刘鑫", "author": "刘鑫",
"source": "double.md", "source": "filter.md",
"notebook_enable": true, "notebook_enable": true,
"exercise_id": "e6410eab038346daa724ca715e808c79" "exercise_id": "e6410eab038346daa724ca715e808c79"
} }
\ No newline at end of file
{ {
"type": "code_options", "type": "code_options",
"author": "刘鑫", "author": "刘鑫",
"source": "form.md", "source": "optional.md",
"notebook_enable": false, "notebook_enable": false,
"export": [
"optional.json"
],
"exercise_id": "3065a850d8bc4ee1b10bf5cdcd78128b" "exercise_id": "3065a850d8bc4ee1b10bf5cdcd78128b"
} }
\ No newline at end of file
{ {
"type": "code_options", "type": "code_options",
"author": "刘鑫", "author": "刘鑫",
"source": "form.md", "source": "optional.md",
"notebook_enable": false, "notebook_enable": false,
"export": [
"optional.json"
],
"exercise_id": "e639c1be98854a59b128da0492cb1126" "exercise_id": "e639c1be98854a59b128da0492cb1126"
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册