[JAVA]직각삼각형(생성자,메소드,스캐너,게터,세터,sqrt)
package chap06; public class RightTriangle { //클래스의 구성요소 필드,생성자, 메소드 // 필드 클래스 변수(전역변수) : 일반적으로 private로 캡슐화 //밑변(double):understool, 높이(double)height 이름(st):name //생성자 초기화오버로딩 //세터게터,일반메소드(getArea, getCircum) double understool; double height; String name; /** * @return the understool */ public double getUnderstool() { return understool; } /** * @param understool the understool to set */ public ..
2023. 1. 4.