[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fJf012qgjAzsqHwU2zchnMhg7ge95BD9i2L1d6cezZD4":3},{"answer":4,"createTime":5,"id":6,"options":7,"origin":8,"question":15,"related":16,"source":22,"type":59},[],"2026-05-21 14:45:57",380840245,[],{"count":9,"courseId":10,"courseImg":11,"courseName":12,"workId":13,"workName":14},8,"53e1d2ef4961cca8eea3e23969ad2cb9","https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F03a579384a6dc297c89809b582fcc767.png","默认课程","fd1c34b7e32c46b39095204f615139fa","7.7 组合关系小测验","请画出组成关系的UML类图,并用Java语言写出组成关系程序结构",[17,24,30,35,40,45,50,56],{"answer":18,"createTime":5,"id":19,"options":20,"question":21,"source":22,"type":23},[],380840238,[],"下图中,类A与类T是( )关系;类A与接口IX是( )关系;类A与类B、类C和接口IX是( )关系.\u003Cimg src=\"https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F59f96e217ca4a82bd6e74e3da067416d.png\">","v1",2,{"answer":25,"createTime":5,"id":26,"options":27,"question":28,"source":22,"type":29},[],380840239,[],"请阅读程序,写出程序运行结果.\u002F\u002F写出程序运行结果class Eye {\u002F\u002F 猫的眼睛类 private String color; public Eye(String color) { this.color = color; }}class Cat {\u002F\u002F 猫类 private String name; private Eye eye; public Cat(String name, Eye eye) { this.name = name; this.eye = eye; } public boolean equals(Object obj) { Cat cat = (Cat) obj; if (this.name.equals(cat.name) &amp;&amp; this.eye == cat.eye) return true; return false; }} public class CatDemo { public static void main(String[] args) { Eye e1=new Eye(&quot;蓝色&quot;); Eye e2=new Eye(&quot;蓝色&quot;); Cat tom=new Cat(&quot;Tome&quot;,e1); Cat jack=new Cat(&quot;Jack&quot;,e2); System.out.println(tom==jack); System.out.println(tom.equals(jack)); }}",9,{"answer":31,"createTime":5,"id":32,"options":33,"question":34,"source":22,"type":29},[],380840240,[],"阅读程序,写出程序运行结果.\u002F\u002F写出程序运行结果class Eye {\u002F\u002F 猫的眼睛类 private String color; public Eye(String color) { this.color = color; }}class Cat {\u002F\u002F 猫类 private String name; private Eye eye; public Cat(String name, Eye eye) { this.name = name; this.eye = eye; } public boolean equals(Object obj) { Cat cat = (Cat) obj; if (this.name.equals(cat.name) &amp;&amp; this.eye == cat.eye) return true; return false; }}public class CatDemo { public static void main(String[] args) { Eye e1=new Eye(&quot;蓝色&quot;); Eye e2=new Eye(&quot;蓝色&quot;); Cat tom1=new Cat(&quot;Tom&quot;,e1); Cat tom2=new Cat(&quot;Tom&quot;,e2); System.out.println(tom1==tom2); System.out.println(tom1.equals(tom2)); }}",{"answer":36,"createTime":5,"id":37,"options":38,"question":39,"source":22,"type":29},[],380840241,[],"阅读程序,写出程序运行结果.\u002F\u002F写出程序运行结果class Eye {\u002F\u002F 猫的眼睛类 private String color; public Eye(String color) { this.color = color; }} class Cat {\u002F\u002F 猫类 private String name; private Eye eye; public Cat(String name, Eye eye) { this.name = name; this.eye = eye; } public boolean equals(Object obj) { Cat cat = (Cat) obj; if (this.name.equals(cat.name) &amp;&amp; this.eye == cat.eye) return true; return false; }} public class CatDemo { public static void main(String[] args) { Eye e1=new Eye(&quot;蓝色&quot;); Cat tom1=new Cat(&quot;Tom&quot;,e1); Cat tom2=new Cat(&quot;Tom&quot;,e1); System.out.println(tom1==tom2); System.out.println(tom1.equals(tom2)); }}",{"answer":41,"createTime":5,"id":42,"options":43,"question":44,"source":22,"type":29},[],380840242,[],"阅读程序,写出程序运行结果.\u002F\u002F写出程序运行结果class Eye {\u002F\u002F 猫的眼睛类 private String color; public Eye(String color) { this.color = color; } public boolean equals(Object obj) { Eye e=(Eye) obj; if(this.color.equals(e.color)) return true; return false; }} class Cat {\u002F\u002F 猫类 private String name; private Eye eye; public Cat(String name, Eye eye) { this.name = name; this.eye = eye; } public boolean equals(Object obj) { Cat cat = (Cat) obj; if (this.name.equals(cat.name) &amp;&amp; this.eye.equals(cat.eye)) return true; return false; }} public class CatDemo { public static void main(String[] args) { Eye e1=new Eye(&quot;蓝色&quot;); Eye e2=new Eye(&quot;蓝色&quot;); Cat tom1=new Cat(&quot;Tom&quot;,e1); Cat tom2=new Cat(&quot;Tom&quot;,e1); System.out.println(tom1==tom2); System.out.println(tom1.equals(tom2)); }}",{"answer":46,"createTime":5,"id":47,"options":48,"question":49,"source":22,"type":29},[],380840243,[],"阅读程序,写出程序运行结果.\u002F\u002F写出程序运行结果class Leg {\u002F\u002F 腿 private int length; public Leg(int length) { this.length = length; } public int getLength() { return length; } public void setLength(int length) { this.length = length; }}class Head {\u002F\u002F 头 private String type;\u002F\u002F 类型 public Head(String type) { this.type = type; } public String getType() { return type; } public void setType(String type) { this.type = type; }} class Person { private String name;\u002F\u002F 姓名 private char sex;\u002F\u002F 性别 private Leg leg;\u002F\u002F腿 private Head head;\u002F\u002F头 public Person(String name) { this.name = name; } public Person(String name, char sex) { this(name); this.sex=sex; } public Leg getLeg() { return leg; } public void setLeg(Leg leg) { this.leg = leg; } public Head getHead() { return head; } public void setHead(Head head) { this.head = head; } public String getPerson() { StringBuffer sb=new StringBuffer(); sb.append(this.name+leg.getLength()+head.getType()); return sb.toString(); }}\u002F\u002F测试类public class DogDemo { public static void main(String[] args) { Leg leg=new Leg(30); Head head=new Head(&quot;国字脸&quot;); Person zhangfei=new Person(&quot;张飞&quot;,'男'); zhangfei.setLeg(leg); zhangfei.setHead(head); leg.setLength(80); System.out.println(zhangfei.getPerson()); }}",{"answer":51,"createTime":5,"id":52,"options":53,"question":54,"source":22,"type":55},[],380840244,[],"一台计算机由CPU、硬盘、内存、主板和电源等部件组成.请分析该问题抽象出类,然后用UML类图表示类之间的关系,并用Java语言实现.(建模为组成关系)",7,{"answer":57,"createTime":5,"id":6,"options":58,"question":15,"source":22,"type":59},[],[],4]