객체지향프로그래밍 과제 보고서 및 코드 (JAVA, 영문 보고서, 코드(.java) 전체 포함)
- 최초 등록일
- 2019.04.10
- 최종 저작일
- 2012.04
- 8페이지/ 압축파일
- 가격 1,000원
소개글
Rectangle, ColoredRectangle, Circle 클래스를 정의하는 과제입니다.
각 클래스의 .java 파일 뿐만 아니라 main 클래스가 정의되어 있는 .java 파일까지 전부 포함되어 있으며, 보고서는 영문으로 작성되어 있습니다.
목차
1. RECTANGLE CLASS
2. COLORRECTANGLE CLASS
3. CIRCLE CLASS
4. MAIN CLASS
5. OUTPUT WINDOW
6. CODES
본문내용
I define the constructors first for the program description. Constructors use “this” for calling other constructor or data members. First, constructor with no parameter sets width and height to 10 and uses “this”. In this constructor, “this” is calling other constructor which has two parameters – it can set the width and height to parameters. And constructor with one parameter sets both width and height to a parameter; also use “this” for calling other constructor which has two parameters. And constructor with two parameters uses “this” not for calling other constructor but for calling the data members. So the last constructor’s code is like this: void Rectangle(int width, int height){ this.width = width; this.height = height;} This code means the parameter width sets the data member width, and the parameter height sets the data member height. And other constructors use this constructor using “this”. Constructor with no parameter’s code is..
<중 략>
참고 자료
없음
압축파일 내 파일목록
Circle.java
ColorRectangle.java
Homework 2.docx
HW2_main.java
hw2_programming.jpg
Rectangle.java