ychoose

학교/소프트웨어공학 2015. 5. 21. 22:41

#include<stdio.h>


#define ych(arr) int n; scanf("%d",&n); printf("%c",arr[n]); 


int main()


{

char arr[4]={'a','b','c','d'};

ych(arr);

}

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

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

[소공] 11.09.06

학교/소프트웨어공학 2014. 3. 20. 16:46

출처 : http://nnoco.tistory.com/33

How can you explain the switch app to a programmer?

switch's essense

i can say step 1!
display a switch with on and off 

step 2 : wait for the user to choose either "on" or "off"

Step3 : if the user chooses "on", then the switch becomes bright. If he choose "off" then the switch becomes dark.

This description seems OK but there is a serious problem.

What is the correct way to describe the switch app?
스위치의 본질과, 무엇을 수행할지를 알려줘야한다.

<O, T> where O is the essence of and object
and T is the specific task. in mind

쓸데 없는 말이 많다. 그냥 개체의 Specification을 정의하면 그 개체의 본질과 행동(Task)이렇게 두가지다.
위의 스위치의 예제는 essense는 없고 task만 있는 상태.

What is O of the switch in this classroom?

switch : on c-and off

the final answer

(on c-and off, on c-and off)

(on c-and off, on)

(on c-and off, off)


claim: Given an obejct, we describe the essence of O by describing what  can do.


외부적으로 드러나는 Task(사용자와의 인터페이스)
앱이 내부적으로 하는 모든 행동(본질) Essence.




Specification of chinese restaurant.

Object :

Task : 

이런 조카 18색 크레파스 설명을 못하네.

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

ychoose  (0) 2015.05.21
스마트폰 대충 설계?!  (0) 2012.12.10
  (0) 2012.12.04
  (0) 2012.11.27
  (0) 2012.11.13

스마트폰 대충 설계?!

학교/소프트웨어공학 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

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

 

 

lee

chef                blacknoodle(yes)

    짬뽕(no)

we

 

 

lee

chef2:            짜(yes)

  짬(yes)

짜  cand 짬        짬(yes)

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

problem:

 

java application

자바경우 cand(초이스 앤드)경우 어떤게 이득?

 

 

Web page:

동아대는 학생수가...웹페이지에 초이스앤드 경우 이점?

 

 

add(x,y): int cand

and(x,y): float

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

Web page:  같은 뜻 단어 둘 중 하나 골라도 된다. ex)영어,한글

ex1) night cand nite

ex2) donga web page->engliweb cand koreanwob

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

  (0) 2012.11.13
  (0) 2012.11.06
10/16  (0) 2012.10.16
10/9  (0) 2012.10.09
  (0) 2012.09.18

10/16

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

 

recursion vs nonrecursion

 

 

recursion

 

rule1: fib(1)=0

rule2: fib(2)=1

rule3: fib(n)=fib(n-1)+fib(n-2)

 

main(){

fib(50);

}

 

prob: redundancy  ,  n-1과 n-2 양쪽에서 중복된 계산 발생

 norecursion:

fib(n)=tmp1=0

temp2=1;

for i=3 to n

tmp = tmp1+tmp2

tmp1=tmp2;

tmp2=tmp

 

prob1: lengthy code , 피보나치 규칙이 명확히 안보인다.

 

 

최종판

rule1: fib[1]=0

rule2: fib[2]=1

rule3: fib[n]=fib[n-1]+fib[n-2]

rule4: fib[3]=2

 

main()

{

for i=3 to n

fib[n]=fib[i-1]+fib[n-2]

}

 

choice or,and sequential or,and

 

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

  (0) 2012.11.06
  (0) 2012.10.30
10/9  (0) 2012.10.09
  (0) 2012.09.18
소프트웨어공학  (0) 2012.09.11

10/9

학교/소프트웨어공학 2012. 10. 9. 11:37

 

 

 

 

 

A->(imply) B

 

ex) lee: ham                lee는 햄버거 만들 수 잇다

lee: 3000->ham       lee는 3000원이 있으면 햄버거 만들 수 있다

 

 

ex)chinese restaurant:

5000->(짜장 xor 짬뽕)

 

 

chinese restaurant        짜(x)

짬(x)

5000->짜(yes)

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

  (0) 2012.11.06
  (0) 2012.10.30
10/16  (0) 2012.10.16
  (0) 2012.09.18
소프트웨어공학  (0) 2012.09.11