블로그
-
[영진전문대학 컴퓨터정보계열] 상속의 계층구조
접근 지정자 Protected : protected가 붙은 맴버는 서브 클래스 에서만 사용가능하다. class Employee { public String name; // 이름: 공용 매소드 재정의(Overriding) // 중복 정의(Overloading) 메소드 재정의(method overriding): 서브 클래스가 필요에 따라 상속된 메소드를 다시 정...
blog.naver.com · 2013.10.27
-
[영진전문대 컴퓨터정보계열 프로그래밍 전공] 10월 7일 수업내용
method(Object o); method(모든객체) 실습) sin(0도), sin(30도), sin(90도), sin(180도) 소수 2째자리 반올림해서 출력 예) sin(0) (90)) == 1.0 sin(PI) - 0 힌트) Math.round(1.67) == 2 1.67 -> 1.7 import java.util.Scanner; public class
blog.naver.com · 2013.10.07
-
[영진전문대 컴퓨터정보계열 프로그래밍전공]자바의 개요2
실습 --------------------------------------------------- import java.util.Scanner; class Exam { int c; (String[] args) { // TODO Auto-generated method stub int sum; int x, y; x = Integer.parseInt(args[0])
blog.naver.com · 2013.08.29
-
[영진전문대 컴퓨터정보계열 프로그래밍전공]실습
실습 public class sdaf { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int fact = 1; for(int i=1; i
blog.naver.com · 2013.09.02
-
자바 반복문
import java.util.Scanner; public class LetterGame { /** * @param args */ public static void main(String [] args) { // TODO Auto-generated method stub int answer=59; int guess; int tries=0; Scanner scan=new
blog.naver.com · 2013.04.17
-
반복문
.*; public class Gcd { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int x,y,r; System.out.println("두개의 정수를 입력하시오 (큰수,작은수):"); Scanner scan=new Scanner(System.in
blog.naver.com · 2013.04.17
-
14일차(10월16일)_메소드 오버로딩, 상속, 메소드 오버라이딩
---------------------------------------메소드 오버로딩 (method overloading) -> 유사한 기능을 묶어서 관리 할 수 있다. 1. //Class39.javapackage com.test; public class Class39 { //메소드 원본 public int add() { int result = 0; return
blog.naver.com · 2012.12.01
-
[MSDN] String.Format Method (String, Object)
String.Format Method (String, Object) Replaces one or more format items in a specified string with the copy of format in which any format items are replaced by the string representation of arg0. public class
blog.naver.com · 2010.08.06
-
Design Pattern의 종류
class to instantiate. Factory Method lets a class defer instantiation to subclasses.
blog.naver.com · 2009.08.21
-
[디자인패턴-1 Creational] Abstract Factory 와 Factory Method
UML(Class Diagram) <> <> Fcatory Method 는 실제 사용하는 메소드의 이름은 동일하지만, Parameter의 수나 type에 따라 Abstract Factory는 각 Specific한 class 자체가 각각 다른 type의 member를 가지지만, 같은 method를 이용하여 구현.
blog.naver.com · 2009.08.21