검색결과 리스트
분류 전체보기에 해당되는 글 54건
- 2013.05.13 130513
- 2013.05.08 20130508
- 2013.05.07 20130507
- 2013.05.01 HCI 20130501
- 2013.04.29 HCI 20130429
- 2013.04.17 TVTEST
- 2013.03.29 윈도우8 넷북 메트로 사용법 (Intel 계열...)
- 2013.03.29 Ultraiso로 Windows ISO USB로 만든 뒤 install.wim 오류시
- 2013.03.27 나눔코딩글꼴
- 2013.03.27 듀얼 모니터 바탕화면 다르게 하기 및 활용하는 툴
글
130513
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package point4dtest;
/**
*
* @author User
*/
class Circle {
final double pi;
double area_result;
int x, y, r;
/*Circle() {
this(0, 0, 0);
}*/
Circle(int x, int y, int r,double pi) {
//this 하면 위의 r을 사용 (맴버변수)
this.r = r;
this.x = x;
this.y = y;
this.pi=3.14;//this.pi=pi로 하면 인자로 쓰게되고, 3.14로 잡아주면 인자 뭐로오던 간에 3.14로 박힘
}
double area()
{
r=3;
area_result=r*r*pi;
return area_result;
}
//생성자에서 초기화 하는 방법
}
class CircleC {
Point center = new Point();
int r;
CircleC()
{
this(0,0,0);
}
CircleC(int x,int y, int z)
{
center.x=x;
center.y=y;
this.r=r;
}
}
class CircleI extends Point {
int r;
CircleI() {
this(0, 0, 0);
}
CircleI(int x, int y, int r) {
this.r = r;
this.x = x;
this.y = y;
}
}
class Point {
int x, y;
Point(int x, int y) {
this.x = x;
this.y = y;
}
Point() {
this(0, 0);
}
/*
String getLocation() {
return "x :" + x + ", y :" + y;
}
*/
}
class Point3D extends Point {
int z;
Point3D(int x, int y, int z) {
super(x,y);
//this.x = x;
//this.y = y;
this.z = z;
}
Point3D() {
this(0, 0, 0);
}
String getLocation()
{
return "x :" + x + ", y :"+ y+"z :"+z;
}
}
class Point4D extends Point3D {
int t;
Point4D(int x, int y, int z, int t) {
super(x,y,z);
/*this.x = x;
this.y = y;
this.z = z;
*/
this.t = t;
}
Point4D() {
this(0, 0, 0, 0);
}
String getLocation() {
return super.getLocation() + " t : " + t;
}
}
public class Point4DTest {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Point p = new Point(0, 0);
Point p2 = new Point();
Point3D p3 = new Point3D(1, 2, 3);
Point4D p4 = new Point4D(1, 2, 3, 4);
CircleC c2 = new CircleC();
Circle cc = new Circle(1,2,3,4);
Point4D p4d = new Point4D();
System.out.println("p.x : " + p.x + " p.y :" + p.y + " p2.x : " + p2.x + " p2.y : " + p2.y + " p3.z : " + p3.z + " p4.x : " + p4.x + " p4.y : " + p4.y + " p4.z : " + p4.z + " p4.t : " + p4.t + " c2.center.x : "
+c2.center.x);
System.out.println(p4d.getLocation());
System.out.println("circle area : "+cc.area());
}
}
'학교 실습 > HCI' 카테고리의 다른 글
20130522 HCI 과제 완료 (0) | 2013.05.22 |
---|---|
20130522 HCI (0) | 2013.05.22 |
20130508 (0) | 2013.05.08 |
20130507 (0) | 2013.05.07 |
HCI 20130501 (0) | 2013.05.01 |
설정
트랙백
댓글
글
20130508
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package point4dtest;
/**
*
* @author User
*/
class Circle {
int x, y, r;
Circle() {
this(0, 0, 0);
}
Circle(int x, int y, int r) {
this.r = r;
this.x = x;
this.y = y;
}
}
class CircleC {
Point center = new Point();
int r;
CircleC()
{
this(0,0,0);
}
CircleC(int x,int y, int z)
{
center.x=x;
center.y=y;
this.r=r;
}
}
class CircleI extends Point {
int r;
CircleI() {
this(0, 0, 0);
}
CircleI(int x, int y, int r) {
this.r = r;
this.x = x;
this.y = y;
}
}
class Point {
int x, y;
Point(int x, int y) {
this.x = x;
this.y = y;
}
Point() {
this(0, 0);
}
/*
String getLocation() {
return "x :" + x + ", y :" + y;
}
*/
}
class Point3D extends Point {
int z;
Point3D(int x, int y, int z) {
super(x,y);
//this.x = x;
//this.y = y;
this.z = z;
}
Point3D() {
this(0, 0, 0);
}
String getLocation()
{
return "x :" + x + ", y :"+ y+"z :"+z;
}
}
class Point4D extends Point3D {
int t;
Point4D(int x, int y, int z, int t) {
super(x,y,z);
/*this.x = x;
this.y = y;
this.z = z;
*/
this.t = t;
}
Point4D() {
this(0, 0, 0, 0);
}
String getLocation() {
return super.getLocation() + " t : " + t;
}
}
public class Point4DTest {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Point p = new Point(0, 0);
Point p2 = new Point();
Point3D p3 = new Point3D(1, 2, 3);
Point4D p4 = new Point4D(1, 2, 3, 4);
CircleC c2 = new CircleC();
Point4D p4d = new Point4D();
System.out.println("p.x : " + p.x + " p.y :" + p.y + " p2.x : " + p2.x + " p2.y : " + p2.y + " p3.z : " + p3.z + " p4.x : " + p4.x + " p4.y : " + p4.y + " p4.z : " + p4.z + " p4.t : " + p4.t + " c2.center.x : "
+c2.center.x);
System.out.println(p4d.getLocation());
}
}
'학교 실습 > HCI' 카테고리의 다른 글
20130522 HCI (0) | 2013.05.22 |
---|---|
130513 (0) | 2013.05.13 |
20130507 (0) | 2013.05.07 |
HCI 20130501 (0) | 2013.05.01 |
HCI 20130429 (0) | 2013.04.29 |
설정
트랙백
댓글
글
20130507
#include <stdio.h>
#include <stdlib.h>
int main()
{
int pid1,pid2,pid3;
printf("자기 자신의 프로세스 : %d\n",getpid());
pid1=fork();
if(pid1==0)
{
printf("부모 프로세스 : %d, 자기 자신의 프로세스 : %d\n",getppid(),getpid());
pid2=fork();
if(pid2==0)
{
printf("부모 프로세스 : %d, 자기 자신의 프로세스 : %d\n",getppid(),getpid());
pid3=fork();
if(pid3==0)
{
printf("부모 프로세스 : %d, 자기 자신의 프로세스 : %d\n",getppid(),getpid());
}
else
{
wait();
}
}
else
{
wait();
}
}
else
{
wait();
}
}
/////////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <stdlib.h>
/* 부모 프로세스가 자식 프로세스를 생성하고 끝나기를 기다린다*/
int main(){
int pid, child, status;
printf("[%d] 부모 프로세스 시작 \n", getpid());
pid= fork();
if(pid == 0){
printf("[%d] 자식 프로세스 시작 \n",getpid());
sleep(10);
exit(1);
}
child = wait(&status);
printf("[%d] 자식 프로세스 %d 종료 \n",getpid(), child);
printf("\t 종료코드 %d\n", status>>8);
}
'학교 실습 > HCI' 카테고리의 다른 글
130513 (0) | 2013.05.13 |
---|---|
20130508 (0) | 2013.05.08 |
HCI 20130501 (0) | 2013.05.01 |
HCI 20130429 (0) | 2013.04.29 |
TVTEST (0) | 2013.04.17 |
설정
트랙백
댓글
글
HCI 20130501
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package cartest2;
class Car {
int fuelecon;
String Diesel;
String Hybrid;
String gasoline;
String fuelType;
String color; // 색상
String gearType; // 변속기 종류 - auto(자동), manual(수동)
int door; // 문의 개수
////////////////////////////////////////////////////////////////////////
Car(String color, String gearType, int door, int fuelecon, String fuelType) {
this.color = color;
this.gearType = gearType;
this.door = door;
this.fuelecon = fuelecon;
this.fuelType = fuelType;
}
Car() {
this("white", "matic", 6, 20, "gasoline");
}
Car(int door, int fuelecon){
this("white","auto",door,fuelecon,"가솔린");
}
}
class CarTest2 {
public static void main(String[] args) {
Car c1 = new Car();
System.out.println("c1의 color=" + c1.color + ", gearType=" + c1.gearType + ", door=" + c1.door+ ", fuelecon=" + c1.fuelecon+ ", fueletype=" + c1.fuelType);
}
}
///////////////////////////////////////////////////////////////////////
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package constructortest;
class Data1 {
int value;
}
class Data2 {
int value;
Data2(int x) { // 매개변수가 있는 생성자.
value = x;
}
Data2(){}
}
class ConstructorTest {
public static void main(String[] args) {
Data1 d1 = new Data1();
Data2 d2 = new Data2(); // compile error발생
}
}
//////////////////////////////////////////////////////////////////////
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package constructortest;
class Data1 {
int value;
}
class Data2 {
int value;
Data2(int x) { // 매개변수가 있는 생성자.
value = x;
}
}
class ConstructorTest {
public static void main(String[] args) {
Data1 d1 = new Data1();
Data2 d2 = new Data2(10); // compile error발생
}
}
////////////////////////////////////////////////////////////////////
설정
트랙백
댓글
글
HCI 20130429
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package overloadingtest;
/**
*
* @author User
*/
class OverloadingTest {
public static void main(String args[]) {
MyMath3 mm = new MyMath3();
System.out.println("mm.add(3, 3) 결과:" + mm.add(3, 3));
System.out.println("mm.add(3L, 3) 결과: " + mm.add(3L, 3));
System.out.println("mm.add(3, 3L) 결과: " + mm.add(3, 3L));
System.out.println("mm.add(3L, 3L) 결과: " + mm.add(3L, 3L));
System.out.println("mm.minus(3, 3) 결과:" + mm.minus(3, 3));
System.out.println("mm.minus(3L, 3L) 결과: " + mm.minus(3L, 3L));
System.out.println("mm.minus(3L, 3) 결과: " + mm.minus(3L, 3));
int[] a = {100, 200, 300};
System.out.println("mm.add(a) 결과: " + mm.add(a));
}
}
class MyMath3 {
int minus(int a, int b) {
System.out.print("int minus(int a, int b) - ");
return a - b;
}
long minus(long a, long b) {
System.out.print("int minus(long a, long b) - ");
return a - b;
}
long minus(long a, int b) {
System.out.print("int minus(long a, int b) - ");
return a - b;
}
int add(int a, int b) {
System.out.print("int add(int a, int b) - ");
return a + b;
}
long add(int a, long b) {
System.out.print("long add(int a, long b) - ");
return a + b;
}
long add(long a, int b) {
System.out.print("long add(long a, int b) - ");
return a + b;
}
long add(long a, long b) {
System.out.print("long add(long a, long b) - ");
return a + b;
}
int add(int[] a) { // 배열의 모든 요소의 합을 결과로 돌려준다.
System.out.print("int add(int[] a) - ");
int result = 0;
for (int i = 0; i < a.length; i++) {
result += a[i];
}
return result;
}
}
설정
트랙백
댓글
글
TVTEST
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tvtest;
/**
*
* @author User
*/
class Tv {
// Tv의 속성(멤버변수)
String color; // 색상
boolean power; // 전원상태(on/off)
int channel; // 채널
int volume; // 볼륨
// Tv의 기능(메서드)
void power() {
power = !power;
} /* TV를 켜거나 끄는 기능을 하는 메서드 */
void channelUp() {
++channel;
} /* TV의 채널을 높이는 기능을 하는 메서드 */
void channelDown() {
--channel;
} /* TV의 채널을 낮추는 기능을 하는 메서드 */
void volumeUP() {
++volume;
}
void volumeDown() {
--volume;
}
}
class TvTest {
public static void main(String args[]) {
Tv t; // Tv인스턴스를 참조하기 위한 변수 t를 선언
t = new Tv(); // Tv인스턴스를 생성한다.
t.channel = -3; // Tv인스턴스의 멤버변수 channel의 값을 7로 한다.
t.channelUp(); // Tv인스턴스의 메서드 channelDown()을 호출한다.
t.power();
System.out.println("티비 앞에 서있습니다.");
// 전원 켜져있을 시
if (t.power==true) {
System.out.println("티비가 켜져있습니다.");
System.out.println("현재 채널은 " + t.channel + " 입니다.");
}
// 전원 꺼져있을 시
else {
System.out.println("티비가 꺼져있습니다.");
}
}
}
'학교 실습 > HCI' 카테고리의 다른 글
130513 (0) | 2013.05.13 |
---|---|
20130508 (0) | 2013.05.08 |
20130507 (0) | 2013.05.07 |
HCI 20130501 (0) | 2013.05.01 |
HCI 20130429 (0) | 2013.04.29 |
설정
트랙백
댓글
글
윈도우8 넷북 메트로 사용법 (Intel 계열...)
regedit에서 검색->display1_down 검색 후,
Display1_DownScalingSupported가 검색되는데, 이 값을 1로 변경하고 제부팅 하면 넷북도 메트로 사용 가능
확인해보니 intel 계열 넷북은 되고 AMD계열쪽은 안되는거 같은데... 으으... 일단 내 C-50 APU는 Failed....
'알아두자 > Windows' 카테고리의 다른 글
윈도우8,7 64비트에서 파이썬 설치 제대로 하기 (0) | 2013.09.15 |
---|---|
WINAPI 프로그래밍시 초기화가 'case' 레이블에 의해 생략되었습니다 오류 관련 (0) | 2013.05.19 |
Ultraiso로 Windows ISO USB로 만든 뒤 install.wim 오류시 (0) | 2013.03.29 |
나눔코딩글꼴 (0) | 2013.03.27 |
듀얼 모니터 바탕화면 다르게 하기 및 활용하는 툴 (0) | 2013.03.27 |
설정
트랙백
댓글
글
Ultraiso로 Windows ISO USB로 만든 뒤 install.wim 오류시
간단하다,
install.wim이 4gb이상 넘어가버리면 죽어버린다...
아마 ultraiso로 USB 구울 시에 파티션 포맷 특성때문에 그런거 같은데,
MS에서 제공하는 windows iso를 usb에 구워주는 프로그램을 사용하면 해결된다
... 물론 받은 이미지가 깨져있다면 이 방법도 안먹히겠지만....
삽질하다가 알아낸 거라 공유하고 싶어서 이렇게 남긴다
'알아두자 > Windows' 카테고리의 다른 글
WINAPI 프로그래밍시 초기화가 'case' 레이블에 의해 생략되었습니다 오류 관련 (0) | 2013.05.19 |
---|---|
윈도우8 넷북 메트로 사용법 (Intel 계열...) (0) | 2013.03.29 |
나눔코딩글꼴 (0) | 2013.03.27 |
듀얼 모니터 바탕화면 다르게 하기 및 활용하는 툴 (0) | 2013.03.27 |
unetbootin을 활용한 리눅스 설치 USB만들기 과정서 유의할 점 (0) | 2013.01.26 |
설정
트랙백
댓글
글
나눔코딩글꼴
'알아두자 > Windows' 카테고리의 다른 글
WINAPI 프로그래밍시 초기화가 'case' 레이블에 의해 생략되었습니다 오류 관련 (0) | 2013.05.19 |
---|---|
윈도우8 넷북 메트로 사용법 (Intel 계열...) (0) | 2013.03.29 |
Ultraiso로 Windows ISO USB로 만든 뒤 install.wim 오류시 (0) | 2013.03.29 |
듀얼 모니터 바탕화면 다르게 하기 및 활용하는 툴 (0) | 2013.03.27 |
unetbootin을 활용한 리눅스 설치 USB만들기 과정서 유의할 점 (0) | 2013.01.26 |
설정
트랙백
댓글
글
듀얼 모니터 바탕화면 다르게 하기 및 활용하는 툴
'알아두자 > Windows' 카테고리의 다른 글
WINAPI 프로그래밍시 초기화가 'case' 레이블에 의해 생략되었습니다 오류 관련 (0) | 2013.05.19 |
---|---|
윈도우8 넷북 메트로 사용법 (Intel 계열...) (0) | 2013.03.29 |
Ultraiso로 Windows ISO USB로 만든 뒤 install.wim 오류시 (0) | 2013.03.29 |
나눔코딩글꼴 (0) | 2013.03.27 |
unetbootin을 활용한 리눅스 설치 USB만들기 과정서 유의할 점 (0) | 2013.01.26 |