-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTPC03.java
More file actions
30 lines (24 loc) · 804 Bytes
/
TPC03.java
File metadata and controls
30 lines (24 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import kr.bit.Book;
import kr.bit.PersonVO;
public class TPC03 {
public static void main(String[] args) {
// 관계를 이해하라. PDT VS UDDT
// 정수 1개를 저장하기 위한 변수를 선언하시오. int a; a=10;
// 책 1권을 저장하기위한 변수를 선언하시오.
Book b; b=new Book();
b.title="자바";
b.price=15000;
b.company="한빛미디어";
b.page=700;
System.out.print(b.title+"\t"); System.out.print(b.price+"\t");
System.out.print(b.company+"\t"); System.out.println(b.page);
PersonVO p;
p=new PersonVO();
p.name="박매일";
p.age=40;
p.weight=68.4f;
p.height=175.7f;
System.out.print(p.name+"\t"); System.out.print(p.age+"\t");
System.out.print(p.weight+"\t"); System.out.println(p.height+"\t");
}
}