고객센터  l  자유게시판
인기검색어 스파, 물놀이, 콘도, 호텔, 레지던스
상반기 리뉴얼 공지
JAVA좀 잘하시는분 ㅠㅠ 헬프미!!

JAVA좀 잘하시는분 ㅠㅠ 헬프미!!

마법

학교 과제인데 도저히 해결이 안돼서여ㅠㅠ아나 지식인이고 뭐고 주위사람들까지 다 물어봐도 모르겠다고 하니;;상속인데 관련 예제인데 도무지 이게 실행이 안되네여

어디가 문제인지를 모르겠어요 오류가 마지막에
GraphicsProgram 선언하면서 나는듯한데

수정방안을 못찾겠네여

import java.awt.*;
abstract class Shape {
protected Color color;
protected int x;
protected int y;

protected Shape(Color c,int x,int y){
color=c;
this.x=x;
this.y=y;
}
public abstract void draw();
}
class Rectangle extends Shape{
private int width;
private int height;
public Rectangle(Color c,int x,int y,int width,int height){
super(c,x,y);
this.width=width;
this.height=height;
}
public void draw(){
System.out.println(Rectangle: +x+,+y+,+width+,+height);
}
}
class Circle extends Shape{
private int radius;
public Circle(Color c,int x,int y,int radius){
super(c,x,y);
this.radius=radius;
}
public void draw(){
System.out.println(Circle: +x+,+y+,+radius);

}
}
public class GraphicsProgram{
public static void main(String args[]){
Shape s1 =new Rectangle(Color.red,0,5,200,300);
Shape s2 =new Circle(Color.green,20,30,100);

s1.draw();
s2.draw();
}
}

번호 제 목 글쓴이 날짜
1975203 mri(MRI)찍을 목,허리디스크 전문병원 어디 없나요? 가을귀 2020-06-01
1975198 하루하루 (5) 해님꽃 2020-05-31
1975192 원형탈모 2년....진행중..ㅠㅠ (6) 예님 2020-05-31
1975185 비누로 머리감는게 좋은가요? (2) 미리별 2020-05-31
1975182 피나스테리드.. 2일에 한알씩 복용해도 되나요? 가람 2020-05-31
1975177 이런경우는 어떻게 해석해야는건가요? 크리미걸 2020-05-30
1975170 가발이나 모자를쓰면 (6) 사라 2020-05-30
1975165 로게인질문이요~ (2) 푸헷 2020-05-30
1754803 프로페시아나 프로스카 ... (4) 빛다 2013-12-29
1754771 살빠지는거랑 탈모랑 관련있나요??? (5) 하예 2013-12-29
1754770 제습관중에 뭐가제일 문제인지 봐주세요 (1) 서향 2013-12-29
1754739 모아 님 두피마사지 좀 ^^ 은아 2013-12-29
1754737 벌써 사이트회원수가 4만이네요... (5) 2013-12-29
1754730 꼭 좀 봐주세요 .. ㅠㅠㅠ (5) 2gether 2013-12-29
1754703 모낭주사 (1) 해까닥 2013-12-29
1754669 로게인이나 마이녹실 사용시 (4) 갤1 2013-12-29
1754655 사람마다 다 다른듯 하네요 (3) 영빈이 2013-12-29
1754619 후 한의원 다닐려고 생각중인데요.. (2) 가을귀 2013-12-29
1754617 샴푸 변경 후 이마에 급격하게 여드름이.. (1) Elfin 2013-12-29
1754612 이바반회원님들은 어떤영양제를 먹고 계십니까?꼭 리플달아주세여 물고기자리 2013-12-29
<<  이전  1 2 3 4 5 6 7 8 9 10  다음  >>