inheritance

    [자바/JAVA] 프로그래밍 - 상속 (inheritance) 실습 문제_2

    [상속 실습문제2] 다음과 같은 조건을 만족하는 프로그램을 작성 하시오 도형의 x,y 좌표 값과 각 도형의 면적, 둘레를 계산하는 프로그램이다. 해당 구현 클래스 다이어그 램과 클래스의 구조를 참고하여 프로젝트를 완성하시오. Point Class package com.hw2.model.vo; public class Point { private int x; private int y; public Point() { } public Point(int x, int y) { this.x = x; this.y = y; } public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; } publi..

    [자바/JAVA] 프로그래밍 - 상속 (inheritance) 실습 문제_1

    [상속 실습문제1] 다음과 같은 조건을 만족하는 프로그램을 작성 하시오 학생과 직원을 관리하는 프로그램으로 상속 구조를 통해 구현해보시오. 해당 클래스 다이어그램 과 클래스 구조를 참고하여 프로젝트를 완성하시오 Person Class package com.hw1.model.vo; public class Person { protected String name; private int age; private double height; private double weight; public Person() { } public Person(int age, double height, double weight) { this.age = age; this.height = height; this.weight = weight..

    [자바/JAVA] 프로그래밍 - 상속성 (Inheritance)

    상속쓰기 전 Desktop Class package com.kh.chap01_beforeVSafter.before.model.vo; public class Desktop { private String brand; private String pCode; private String pName; private int price; private boolean allInOne; public Desktop() { } public Desktop(String brand, String pCode, String pName, int price, boolean allInOne) { this.brand = brand; this.pCode = pCode; this.pName = pName; this.price = price; t..