그래픽스 실습

학교/그래픽스 2013. 4. 12. 17:14

#include <glut.h>


void MyDisplay()

{

glClear(GL_COLOR_BUFFER_BIT);


glBegin(GL_POLYGON);

glVertex3f(-0.5, -0.5, 0.0);

glVertex3f(0.5, -0.5, 0.0);

glVertex3f(0.5, 0.5, 0.0);

glVertex3f(-0.5, 0.5, 0.0);

glEnd();

glFlush();


}

int main()

{

glutCreateWindow("OpenGL Drawing Example");

glutDisplayFunc(MyDisplay);

glutMainLoop();

return 0;

}

'학교 > 그래픽스' 카테고리의 다른 글

OPENGL 설치  (0) 2013.06.07
openGL 설치  (0) 2013.06.05
reshape.cpp  (0) 2013.05.03
mouse.cpp  (0) 2013.05.03

엔터프라이즈 실습4

학교/엔터프라이즈 2013. 3. 28. 17:47

import java.util.*;

public class CollectionTest {
 public static void main(String[] args) {
  //HashSet set = new Hashset();//모든데이터를 다 담을 수 있는 형태
  HashSet<Integer> setI = new HashSet<Integer>();//정수만 담을 수 있다.
  setI.add(new Integer(100));//오토박싱 언박싱 해줘서 알아서 정수값으로 넣어줌. 걍 아래랑 똑같은기능
  setI.add(10);
  //setI.add(new Double(10.0));//정수값만 받으므로 안됨
  
  Iterator<Integer> out = setI.iterator();
  
  
  
  
  while(out.hasNext()){
   //int i = (out.next()).intValue();
   int i = out.next();//오토박싱 언박싱이 되기때문에 위에거처럽 할필요 없음
   
  }
  
  ////////////////////////////////////////////////////////////////
  ArrayList<String> list = new ArrayList<String>();
  list.add("first");
  list.add("first");
  list.add("first");
  list.add("first");
  list.add(1, "second");
  list.set(1, "third");//수정
  //list.remove(0);//index지정해서 지움
  list.remove("first");//똑같은 값을가지는 첫번째 것만 지움!!
  
  for(int j = 0; j<list.size(); j++)
  {
   System.out.println(list.get(j));//리스트에서 값을 가져올때 사용하는건 get함수 인자값은 리스트인덱스
   
  }
  
  for(String s : list)
  {
   System.out.println(s);
  }
  ///////////////////////////////////////////////////////////////////
  
  HashMap<String, Integer> map = new HashMap<String, Integer>();//<키, 벨류>
  
  map.put("b", 50);
  map.put("c", 888888);
  map.put("d", 33);
  map.put("a", 100);
  map.put("ff", 4444);
  
  
  //map.get("a"); //키값으로 접근
  
  Set<String> keySet = map.keySet();//키의 집합을 구함!!!
  Iterator<String> key = keySet.iterator();//Iterator를 만듦
  while(key.hasNext()){
   System.out.println(map.get(key.next()));//키값넘겨줘서 value값 빼옴
  }
  
  
 }

}

'학교 > 엔터프라이즈' 카테고리의 다른 글

실습 채팅 ClientFrame  (0) 2013.04.18
엔터프라이즈 실습3  (0) 2013.03.27
엔터 프라이즈  (0) 2013.03.22
엔터프라이즈  (0) 2013.03.06

엔터프라이즈 실습3

학교/엔터프라이즈 2013. 3. 27. 10:22

import java.util.*;


public class CoollectionTest {


/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

HashSet set =new HashSet();

set.add(new Integer(100));

set.add(10);

set.add(new Double(20.0));

Iterator out=set.iterator();

while((out.hasNext())) //계속해서 다음값으로 넘어감

{

Object object=out.next(); //값을 가져옴

if(object instanceof Integer) //object값을 정수인지 실수인지 확인

{

}else if(object instanceof Double)

{

}

}

}


}


'학교 > 엔터프라이즈' 카테고리의 다른 글

실습 채팅 ClientFrame  (0) 2013.04.18
엔터프라이즈 실습4  (0) 2013.03.28
엔터 프라이즈  (0) 2013.03.22
엔터프라이즈  (0) 2013.03.06

엔터 프라이즈

학교/엔터프라이즈 2013. 3. 22. 21:52

class Car
{
    private String model;
    private String color;
    private int speed;
    private int account;
   
    Car()
    {
       
    }
   
    public int getAccount() {
        return account;
    }

    public void setAccount(int account) {
        this.account = account;
    }

    public void printState()
    {
        System.out.println(model);
        System.out.println(color);
        System.out.println(speed);
    }
   
}


///////////

public interface OperateCar {
    boolean getRadarFront(double distanceToCar,double speedOfCar);
    boolean getRadarRear(double distanceToCar,double speedOfCar);
}


//////////////

class Texi extends Car implements OperateCar
{
    double drivingDistance;
    double money;    // 요금
    Texi()
    {
   
    }
   
    public void printState()
    {
        super.printState();
        money=drivingDistance*1000;
        System.out.println("택시 요금 : "+money);
    }
    @Override

    public boolean getRadarFront(double distanceToCar, double speedOfCar) {//전면
        // TODO Auto-generated method stub
        return false;
    }
    @Override
    public boolean getRadarRear(double distanceToCar, double speedOfCar) {//후면
        // TODO Auto-generated method stub
        return false;
    }


}




'학교 > 엔터프라이즈' 카테고리의 다른 글

실습 채팅 ClientFrame  (0) 2013.04.18
엔터프라이즈 실습4  (0) 2013.03.28
엔터프라이즈 실습3  (0) 2013.03.27
엔터프라이즈  (0) 2013.03.06

엔터프라이즈

학교/엔터프라이즈 2013. 3. 6. 09:23

bond0920@naver.com

017-546-1596

형대진교수님


자바 스텐다드 에디션 쓴다



엔터프라이즈 애플리케이션-전체적인 기업운영에 필요한 애플리케이션

엔터프라이즈 특징 -높은복잡도,확장성,컴포넌트 기반의 분산된구조,다른 애플리케이션 상호작용

엔터프라이즈 계층-프레젠테이션 계층,비즈니스 계층,데이터 계층 <-3티어



주 교제 : UML과 JAVA로 배우는 객체지향 CBD 실전

강의 자료 : 가상대학자료실



part1 자바 프로그래밍 디비핸들링


part2 시스템 설계 과정 , UML을 이용한 시스템 설계


part3 시스템 구현


출석 5%

프로잭트 25% 

(설계에서 구현까지 자바랑 DB들어가야함)  

1. 계획서 A4 한장 제출

자바를 이용해서 DB를 핸들링 할수 있는 프로그램

2. UML 끝날 때쯤 설계서 제출

3. 구현물

중간 30%

기말 30%

기타 5%  (수업 실습)



'학교 > 엔터프라이즈' 카테고리의 다른 글

실습 채팅 ClientFrame  (0) 2013.04.18
엔터프라이즈 실습4  (0) 2013.03.28
엔터프라이즈 실습3  (0) 2013.03.27
엔터 프라이즈  (0) 2013.03.22

스마트폰 대충 설계?!

학교/소프트웨어공학 2012. 12. 10. 13:10

staruml-5.0-with-cm.exe

설계...

스마트폰설계.uml

'학교 > 소프트웨어공학' 카테고리의 다른 글

ychoose  (0) 2015.05.21
[소공] 11.09.06  (0) 2014.03.20
  (0) 2012.12.04
  (0) 2012.11.27
  (0) 2012.11.13

학교/소프트웨어공학 2012. 12. 4. 11:18

SW development process:


step 1 : user requirement analysis

output : a sheet that has all the user's requirements:


step 2 :specification

ensure that the developer and customer agree on the detail.


output specification in korean informally.

CL(컴퓨터로직이 젤좋음) formally

state transition mach logic, petri-net...등


step 3 : Design of SW.

a. discover the rules : 

b. divide a big unit into smaller units. (use object-oriented languagges than C)


step 4 : Implementation

my suggestion:

twos - step implementation :

 recursion --> nonrecursion


step 5: testing and proving correctness.



What is UML???


object-oriented language


A tool that helps us report to the boss.

==============================


SW procerss model:

-wather fall mode

stap1~5

-incremental 

-molon,prototype

model

=======================================

SW 기존 : 강의 자료                 

---------------------------------------



시험문제

recusion:(1 problem)SW process steps:

specification:

CL

android programming.                                                                                                                       

'학교 > 소프트웨어공학' 카테고리의 다른 글

[소공] 11.09.06  (0) 2014.03.20
스마트폰 대충 설계?!  (0) 2012.12.10
  (0) 2012.11.27
  (0) 2012.11.13
  (0) 2012.11.06

학교/소프트웨어공학 2012. 11. 27. 11:30

 

ex) how can we represent "I go to school".? text representation "I go to school"

 

this sentence include many new concepts such as "moving"

 

 

ex) MJ is a singer and Psy is a singer

 

=>representation

 

singer(MJ) and isnger(Psy)

   pand

(a)

=> every people must die.

    everyone is mortal.

 

=>infinity, conditional statement,.....

 

(b)

man(lee)   --> mortal(lee)

pand(cand)

man(tom) --> mortal(tom)

pand(cand)

man(ann) --> mortal(ann)

pand(cand)

 

 

(a)보다 (b)가 컴터로 표현하기 나으다.

 

ex) every man has a soulmate japaridze

 

man(A) pand soulmate(japaridze) cor soulmate(B) cor soulmate(C) cor soulmate(D) .....

man(B) pand soulmate(japaridze) cor soulmate(A) cor soulmate(C) cor soulmate(D) .....

.

.

.

 

'학교 > 소프트웨어공학' 카테고리의 다른 글

스마트폰 대충 설계?!  (0) 2012.12.10
  (0) 2012.12.04
  (0) 2012.11.13
  (0) 2012.11.06
  (0) 2012.10.30

학교/소프트웨어공학 2012. 11. 13. 11:29

 

 

pand , por

 

A pand B : the machine can do A and B in parallel

A por B : perform A and B in parallel and it is a success if at least one of them is a success.

 

ex) object in Java

x,y: int

(f= )  pand

(g= )  pand

(h= )  pand

pand : f,g,h를 병렬로 처리 가능하다.

-------------------------

sepcification

-------------------------

ex)  coffee vending machine:

programmer    customer

 

<O,T>

O:조직

T:task

 

O정의

 

100\-> (밀크 cor 블랙)

 

T정의

 

a) document the coffee vendir machine as elegantly as possible

 

step1: wait for a coin from the user.

step2: request the user to select blackcoffee or milk coffee.

step3: put out the selected coffee.

 

 

 

 

b) implement the coffee vending machine in Java if you want.(optional)

'학교 > 소프트웨어공학' 카테고리의 다른 글

  (0) 2012.12.04
  (0) 2012.11.27
  (0) 2012.11.06
  (0) 2012.10.30
10/16  (0) 2012.10.16

학교/소프트웨어공학 2012. 11. 6. 10:54

chef 1: 짜 cand 짬

chef 2: 짜 cor 짬 (env 가 결정)

chef2    짜 (no)

Java application or

Web application

 

 

 

Java objects:

obj1: maile cor female

  cloudy cor sunny

  30s cor 40s

  red cor blue

 

maie and cloudy and 30 and red->red umbrella spagetti

'학교 > 소프트웨어공학' 카테고리의 다른 글

  (0) 2012.11.27
  (0) 2012.11.13
  (0) 2012.10.30
10/16  (0) 2012.10.16
10/9  (0) 2012.10.09