/*
import java.util.*;
public class Main {
String name;
int year;
int inch;
Main(String n, int y, int i) {
name=n;
year=y;
inch=i;
}
void show() {
System.out.printf(name+"에서 만든 "+year+"년형"+inch+"인치 TV");
}
public static void main(String[] args) {
Main myTV=new Main("LG",2017,32);
myTV.show();
}
}
*/
/*
import java.util.*;
class Grade{
int math;
int science;
int english;
Grade(int math,int science,int english)
{
this.math=math;
this.science=science;
this.english=english;
}
int average()
{
return (math+science+english)/3;
}
}
public class Main{
public static void main(String[] args) {
Scanner t=new Scanner(System.in);
System.out.printf("수학, 과학, 영어 순으로 3개의 점수 입력>>");
int math = t.nextInt();
int science = t.nextInt();
int english = t.nextInt();
Grade me = new Grade(math, science, english);
System.out.println("평균은 " + me.average());
}
}
*/
/*
import java.util.*;
class song{
String title;
String artist;
int year;
String country;
song(String title, String artist, int year, String country)
{
this.title=title;
this.artist=artist;
this.year=year;
this.country=country;
}
void show()
{
System.out.printf(year+"년 "+country+"국적의 "+artist+"가 부른 "+title);
}
}
public class Main{
public static void main(String[] args) {
song a= new song("Dancing Queen","ABBA",1987,"스웨덴");
a.show();
}
}
*/
import java.util.*;
class rectangle{
int x;
int y;
int width;
int height;
rectangle(int x,int y,int width,int height){
this.x=x;
this.y=y;
this.width=width;
this.height=height;
}
int square(){
return(width*height);
}
void show() {
System.out.printf("(" +x+ "," +y+ ")" +"에서 크기가"+ width+"x"+height+"인 사각형");
}
boolean contains(rectangle r) {
}
public class Main{
public static void main(String[] args) {
rectangle r = new rectangle(2,2,8,7);
rectangle s = new rectangle(5,5,6,6);
rectangle t = new rectangle(1,1,10,10);
r.show();
System.out.println("s의 면적은 " + s.square());
if(t.contains(r)) {
System.out.println("t는 r을 포함합니다.");
}
if(t.contains(s)) {
System.out.println("t는 s을 포함합니다.");
}
}
}