最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

麻煩大佬幫忙看一下,這個(gè)哪里錯(cuò)了?

麻煩大佬幫忙看一下,這個(gè)哪里錯(cuò)了?

package practice;interface DrawCircle { public void drawCircle(int radius, int x, int y);}class RedCircle implements DrawCircle { public void drawCircle(int radius, int x, int y) { System.out.println("Drawing Circle[red,radius:" + radius + ",x:" + x + ",y:" + y + "]"); }}class GreenCircle { public void drawCircle(int radius, int x, int y) { System.out.println("Drawing Circle[red,radius:" + radius + ",x:" + x + ",y:" + y + "]"); }}abstract class Shape { protected DrawCircle drawCircle; public Shape(DrawCircle drawCircle) { this.drawCircle = drawCircle; } public abstract void draw();}class Circle extends Shape{ private int x,y,radius; public Circle(int x,int y,int radius,DrawCircle drawCircle) { super.drawCircle=drawCircle; this.x=x; this.y=y; this.radius=radius; } public void draw() { drawCircle.drawCircle(radius, x, y); }}public class DrawCirclMain { public static void main(String[] args) { Shape redCircle=new Circle(100, 100, 10, new redCircle()); Shape greenCircle=new Circle(200, 200, 10, new greenCircle()); redCircle.draw(); greenCircle.draw(); }}
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 1215 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)