2015년 11월 5일 목요일

[OOP - Take home final exam] Due: Nov. 20, 2015 (Updated on OCt. 30, 2015)

[Note-11-04] You don't have to implement a chatting service. Just OMOK....

[Note] Enhance your 2-player online OMOK game with the JavaFx (for GUI) and Socket


- Input Method : Mouse (or  Keyborads)
  Especially, the just exploit a mouse right-button press method to put a stone on the board 

30% of final exam
(Note: Written final exam (70%) + Take-home exam (30%) = Final exam (100%))

[Grading guidelines]
- Object-oriented programming structure (20%)
- GUI (30%)
- Socket communication (10%)
- Exception and error handling (10%)
- Program source comments  (10%)
- OMOK Game function  (20%)

Click here !!

[Probability] HW4 (Due: Nev. 19, 2015)

HW4

2015년 11월 2일 월요일

[OO-Java] Sample Code !! - Thread Kill


public class ThreadKill {

public static void main(String[] args) {

// Create tasks
Runnable MyTaskB = new Task2();

// Create threads
Thread thread0 = new Thread(MyTaskB);
thread0.start();
}
}

//The task for printing a character a specified number of times
class Task1 implements Runnable {
int i = 0;
int j = 0;

public void run() {

Thread t = Thread.currentThread();
String name = t.getName();

try {
while (!Thread.interrupted()) {
i += 1;
j += 1;
System.out.println("[" + name + "] " + "i: " + i + " j: " + j);
Thread.sleep(1000);
}
} catch(InterruptedException ex) {
// The interrupt() method interrupts a thread in the following way:
// If a thread is currently in the Ready or Running state,
//    its interrupted flag is set;
// if a thread is currently blocked,
//      it is awakened and enters the Ready state,
//      and a java.lang.InterruptedException is thrown.
// ex.printStackTrace(); //Verify What happens if we take out this statement

}
}
}

//The task class for printing numbers from 1 to n for a given n
class Task2 implements Runnable {

@Override /** Tell the tread how to run */
public void run() {

Thread thread1 = new Thread(new Task1());
Thread thread2 = new Thread(new Task1());
Thread thread3 = new Thread(new Task1());

thread1.start();
thread2.start();
thread3.start();

try {
Thread.sleep(2000);
}  catch(InterruptedException ex) {
// ex.printStackTrace(); //Verify What happens if we take out this statement
}

thread1.interrupt();
thread2.interrupt();
thread3.interrupt();

//thread1.stop(); // Try this One!!
//thread2.stop();
//thread3.stop();

System.out.print("Num: " + 1 + " ");
}
}



[OO-Java] Sample Code !! - Thread Join


public class ThreadJoin {

public static void main(String[] args) {

// Create tasks
Runnable MyTaskB = new Task2();

// Create threads

Thread thread0 = new Thread(MyTaskB);
thread0.start();
}
}

//The task for printing a character a specified number of times
class Task1 implements Runnable {
int i = 0;
int j = 0;

public void run() {

Thread t = Thread.currentThread();
String name = t.getName();

i += 1;
j += 1;
System.out.println("[" + name + "] " + "i: " + i + " j: " + j);
}
}

//The task class for printing numbers from 1 to n for a given n
class Task2 implements Runnable {

@Override /** Tell the tread how to run */
public void run() {

Thread thread1 = new Thread(new Task1());
Thread thread2 = new Thread(new Task1());
Thread thread3 = new Thread(new Task1());

thread1.start();
thread2.start();
thread3.start();

try {
thread1.join();
// System.out.print("Num: " + 1 + " ");
thread2.join();
// System.out.print("Num: " + 2 + " ");
thread3.join();
// System.out.print("Num: " + 3 + " ");
System.out.print("Num: " + 1 + " ");
} catch (InterruptedException ex) {
ex.printStackTrace();
}

}
}



2015년 10월 23일 금요일

[OOP] 자바 튜터링을 받을 학생 4명을 모집합니다. (매진)

자바 튜터링 2기 학생을 모집합니다. (1기는 완료됨) ^^

[대상]

- 현재 내 자바 수업 듣는 학생들 (분반 상관없음)

[혜택]

- 대학원생들이 자바 숙제와 관련된 도움을 받을 수 있습니다.
  (예를 들어 오목 게임 GUI 만들기 등과 같은 숙제에 소스 제공 및 프로그래밍 테크닉
 에 대한 도움을 카톡 혹은 연구실에 오면 직접 친절하게 가르쳐 드립니다.)

- 방학 기간 동안 안드로이드 기반 스마트 폰 프로그래밍에 대한  튜터링도 해줍니다: 해당 대학원생들은 산업체에서 많은 프로그래밍 경험을 한 실력이 뛰어나고, 성격도 좋아요

[제출 서류]

재학 증명서와 성적 증명서


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





2015년 10월 15일 목요일

(Updated on Oct. 14) [OOP - Take home midterm exam] Due: Oct. 16, 2015

[Note] Develop your own algorithm!! Do not use the algorithm shown in the document as attached here!!
[Rule]
Only close 3 X 3 (Sam-Sam) is not allowed, such as
( ooo
    o
    o   )
Open 3 X 3 is allowed, such as
(ooNoStoneo
                o
                o)
If you have already implemented the rule that open 3 X 3 is not allowed, that's O.K. Thus, you don't have to modify your OMOK game.)
4 X 3 (Sa-Sam) is allowed
4 X 4 (Sa Sa) is allowed

The rule is simple, be the first to get an unbroken row of only five pieces horizontally, vertically or diagonally to win the game .


(An unbroken of more than five pieces is allowed but it is not a wining strategy!!)

20% of midterm exam
(Note: Written midterm exam (80%) + Take-home exam (20%) = Midterm exam (100%))

Implement 2-player OMOK game using the OMOK game source as attached here.

OMOK stone symbol for the 1st player: O
OMOK stone symbol for the 2nd player: X

The OMOK board size is 19 X 19 dimensions

No GUI (Graphic User Interface) is required. Just text-based OMOK game is enough this time.

We may improve the OMOK game step by step.
The final version of OMOK game will be an online version of one-to-one OMOK game.

Omok Source (A new version of file has been uploaded on Oct. 12, which removes redundant homework problems that we have already done the other day)


2015년 10월 12일 월요일

[OOP] Homework 7 (Due Oct. 30)

If you get homework 6 done with a recursive method, your homework will be like this:
=> Just check out if a given string is Slimp or not in a non-recursive method.

Otherwise,
=> Just check out if a given string is Slimp or not in a recursive method.



[OOP] Review list for the midterm exam

[1] Study examples including source codes we discussed by Oct. 7
[2] Study homework problems including OMOK game
[3] Study recursive problems we have discussed so far (by Oct. 7)
[4] Study how to find regular pattern regarding to integer numbers
[5] Study the difference between call by value and call by reference in terms of single or multiple dimensional array
[6] Visibility modifiers addressed on the Lecture Notes entitled with "Objects and classes"

[Midterm week, no class on Oct. 21]

Wish you good luck~

[Probability] Review list for the midterm exam

[1] Study examples and two pieces of homework we discussed by Oct. 7
[2] Study some examples related to antenna placement strategies
[3] Study the birthday problem
[4] Study stock investment shown in homework

[Midterm week, no class on Oct. 21]

Wish you good luck~

2015년 10월 5일 월요일

[O-O Java] HW 6 (Due: October 16, 2015) - a new version (including a sample version of incomplete recursion~)

HW 6

Just check out if a given string is Slimp or not!!
You don't have to do Slurpy test!! - It is too much of homework~

Someone got already done with this homework in a recursive version.
It is O.K with a recursive version.
A recursive approach will be may easier than a non-recursive approach.

However, please try it with a non-recursive version.

Can we do this homework version with a non-recursive version?
Really, Huh?

If you don't want to use the state machine, that's O.K.
Maybe you can use several "pattern match methods" found by googling!!

However, I want you to do this homework for yourself (But it is not mandatory)

My point is that there is "No Restriction" with this homework..
Give it a try with this homework.

Enjoy yourself with this homework!!

(Probably in a non-recursive version,

[1] The number of "AB" or "AE" or "AD" in a string is the same as the number of "C" in the end part of the string.
[2] When you get to 'C', you need to check out how many 'C' is required to verify the given string is Slimp or not.)

[PS] The sample code included in the word file as attached here is not a correct working code. It is a just reference code for your homework!!

(Updated on Oct. 5, 2015)






2015년 9월 20일 일요일

[O-O Java] Homework #5 (Due: October 9, 2015)

HW5


Please submit your HW to the report box in front of NC Lab, where located at office #319, 자연대연구실험동 (c-26) by 7:00 pm (or much earlier is possible).


[O-O Java] Homework #4 (Oct. 2, 2015)

HW4


Please submit your HW to the report box in front of NC Lab, where located at office #319, 자연대연구실험동 (c-26) by 7:00 pm (or much earlier is possible).



2015년 9월 18일 금요일

[Java - Homework #3] Due: September 25, 2015

Homework #3

Please submit your HW to the report box in front of NC Lab, where located at office #319, 자연대연구실험동 (c-26).
by 7:00 pm (or much earlier is possible).


2015년 6월 10일 수요일

[C++, Unix] Final exam topics will not cover the topics already covered by the midterm exam

[C++] Late Take-Home Exam submission related to the vending machine design/implementation should not be accepted. No rules without exceptions. 

2015년 5월 27일 수요일

[C++ Take-home final exam] Due: June 11)

 20 %of final exam
(Note: Written final exam (80%) + Take-home exam (20%) = Final exam (100%))

pdf

         __                              ___   __        .ama     ,
      ,d888a                          ,d88888888888ba.  ,88"I)   d
     a88']8i                         a88".8"8)   `"8888:88  " _a8'
   .d8P' PP                        .d8P'.8  d)      "8:88:baad8P'
  ,d8P' ,ama,   .aa,  .ama.g ,mmm  d8P' 8  .8'        88):888P'
 ,d88' d8[ "8..a8"88 ,8I"88[ I88' d88   ]IaI"        d8[         
 a88' dP "bm8mP8'(8'.8I  8[      d88'    `"         .88          
,88I ]8'  .d'.8     88' ,8' I[  ,88P ,ama    ,ama,  d8[  .ama.g
[88' I8, .d' ]8,  ,88B ,d8 aI   (88',88"8)  d8[ "8. 88 ,8I"88[
]88  `888P'  `8888" "88P"8m"    I88 88[ 8[ dP "bm8m88[.8I  8[
]88,          _,,aaaaaa,_       I88 8"  8 ]P'  .d' 88 88' ,8' I[
`888a,.  ,aadd88888888888bma.   )88,  ,]I I8, .d' )88a8B ,d8 aI
  "888888PP"'        `8""""""8   "888PP'  `888P'  `88P"88P"8m"


 ..--------------------.. 
|``--------------------''|
|                        |
|      ,,,;;;;;;,,,      |
|   ,;;;;;;;;;;;;;;;;,   |
|  ;;;;;;;;;;;;;;;;;;;;  |
| ;;;;;;;;;'''  _  '';;; |
|   _'''_  _   (_'  |  ` |
|  |_) |_  |_) ._)  |    |
| .|   |_  |     .....   |
| :::..     ...::::::::: |
|  ::::::::::::::::::::  |
|   '::::::::::::::::'   |
|      '''::::::'''      |
|                        |
|                        | 
';----..............----;'  
  '--------------------'

2015년 5월 26일 화요일

[Final Exam Date] June 15 (Mon)

Final exams for C++, Unix Morning and Afternoon classes will be taken on June 15 (Mon), 2015. The same classroom and class hour are for the exams

Keep up with your study!!


2015년 5월 20일 수요일

[C++] Hint for Homework 12

  \                                  \        __
   \                                  \       | \
    >     Pretty Difficult        >------|  \       ______
   /                                  /       --- \_____/**|_|_\____  |
  /                                  /          \_______ --------- __>-}
 /----------------------------------/              /  \_____|_____/   |
                                                   *         |
                                                            {O}

template< typename NODETYPE >
bool List< NODETYPE >::removeFromFront( NODETYPE &value )
{
    if ( isEmpty() ) // List is empty
        return ?????; // delete unsuccessful
    else
    {
        ListNode< NODETYPE > *tempPtr = firstPtr; // hold tempPtr to delete

        if ( firstPtr == lastPtr )
            no nodes remain after removal;
        else
             point to previous 2nd node

        // return data being removed
       delete tempPtr; // reclaim previous front node
       return true; // delete successful
    } // end else
} // end function removeFromFront

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

template< typename NODETYPE >
bool List< NODETYPE >::removeFromBack( NODETYPE &value )
{
      if List is empty
      return ???; // delete unsuccessful
      else
      {
          ListNode< NODETYPE > *tempPtr = lastPtr; // hold tempPtr to delete

          if List has one element
             no nodes remain after removal
          else
          {
              ListNode< NODETYPE > *currentPtr = firstPtr;

              // locate second-to-last element
              while ( currentPtr->nextPtr != lastPtr )
                       move to next node;

              remove last node
              this is now the last node
          } // end else
       
         return value from old last node
         reclaim former last node
         return ???
     } // end else
} // end function removeFromBack

2015년 5월 19일 화요일

[C++, Unix Systems] No more homework will be assigned by this week (May, 25)

Have a nice weekend ^.^*

 __________________________________________________
|          _____________________________           |
| [1] [2]  _____________________________ [_][_][_] |
| [3] [4]  [_][_][_] [_][_][_][_] [_][_] [_][_][_] |
| [5] [6]  [][][][][][][][][][][][][][_] [1][2][3] |
| [7] [8]  [_][][][][][][][][][][][][][] [4][5][6] |
| [9][10]  [__][][][][][][][][][][][][_] [7][8][9] |
| [11][12] [___][][][][][][][][][][][__] [__][0][] |
|          [_][______________][_]                  |
|__________________________________________________|

[Unix] Homework 10 (Due: May 26)

pdf

Just make your shell script simple!!. Don't think about this homework too much.
It is just one piece of homework

- docx file format will not be given. Use previous homework template!!)


  _______________          |*\_/*|________
  |  ___________  |        ||_/-\_|______  |
  | |           | |        | |           | |
  | |   0   0   | |        | |   0   0   | |
  | |     -     | |        | |     -     | |
  | |   \___/   | |        | |   \___/   | |
  | |___     ___| |        | |___________| |
  |_____|\_/|_____|        |_______________|
    _|__|/ \|_|_.............._|________|_
   / ********** \            / ********** \
 /  ************  \        /  ************  \
--------------------      --------------------

[C++] Homework 12 (Due: May 26)

pdf

- docx file format will not be given. Use previous homework template!!)

- You can find several sources related to linked list algorithms using Googling!!. But I want you to do this homework for yourself..

                 !         !          
                             ! !       ! !          
                            ! . !     ! . !          
                               ^^^^^^^^^ ^            
                             ^             ^          
                           ^  (0)       (0)  ^       
                          ^        ""         ^       
                         ^   ***************    ^     
                       ^   *                 *   ^    
                      ^   *   /\   /\   /\    *    ^   
                     ^   *                     *    ^
                    ^   *   /\   /\   /\   /\   *    ^
                   ^   *                         *    ^
                   ^  *                           *   ^
                   ^  *                           *   ^
                    ^ *                           *  ^  
                     ^*                           * ^ 
                      ^ *                        * ^
                      ^  *                      *  ^
                        ^  *       ) (         * ^
                            ^^^^^^^^ ^^^^^^^^^ 

2015년 5월 11일 월요일

[C++] Homework 11 (Due Date: May 18, 2015)

docx

pdf

You can find several sources related to multiplication and division algorithms using Googling!!. But I want you to do this homework for yourself..

2015년 5월 7일 목요일

[Unix] Homework 9 - UDP Chatting (May 13)

docx

pdf

Actually, reading and writing messages concurrently require you to use thread programming skills. But this homework does not require you to do so..
Just ping pong based programming is O.K. with this homework.
However, I want you to try using thread programming programming skills.

[C++] Homework 10 - Polymorphism (Due: May 14)

docx

pdf

[C++] Homework 9 - Inheritance (Due: May 12)

docx

pdf


2015년 3월 12일 목요일