assignment 조금 재미있네 ㅎㅎ

Posted at 2010/01/28 03:20 in [Diary]

간만에 숙제 한다고 집중 좀 했음!!
대충해서 마이너 버그가 있을거 같지만 5, 6번 한다고 시간 좀 썼네~

Download the 2 attached Java class definition files.  The Grid class stores a rectangular map of rows and columns with an object to move inside the defined area. Use the JGrasp tool to build documentation to find out what methods are available to you in this Grid class.  The GraphicGrid class uses a Grid object to display a Graphical window so you can see the results of your programming steps. There is no need to worry about any of the methods in the GraphicGrid class as you do not need to use any of them.

A Grid object has a maximum size of 22 rows by 36 columns.  When you pass the row and column values when you create a Grid object, it creates a map of the size you specify.

The constructor method when passing two integer values to the Grid object includes a border on the outside of your map with 1 spot empty, or an exit from the Grid.  The exit is in a random position each time you run a Grid program.  It also places a mover object at a random position inside your map and the mover object is facing a random direction, NORTH, SOUTH, EAST or WEST.

You are to write a program that uses both a Grid object and a GraphicGrid object that:

1. Asks the user for the number of rows (Validate the value is between 3 and 22)
2. Asks the user for the number of columns (Validate the value is between 3 and 36)
3. Create the desired Grid object
4. Passes the Grid object to create a GraphicGrid object
5. Navigates through EVERY point in the Grid so that all dots disappear
6. Finds the exit and ends the program without falling off the Grid

Submit your source code for credit.  I do not necessarily expect all of you to individually solve this logic puzzle, so step 5 and 6 may not be complete, but your code should compile and should have step 1-4 completed and then steps 5 & 6 to the best you can figure out.

To solve the logic, think of how you as a human would perform the steps using only the methods that are defined in the Grid class.  The solution I am looking for will accomplish both tasks 5 & 6, but do not be concerned about retracing steps or trying to solve the problem in the fewest number of steps.  Those types of solutions are for the algorithms class, not our beginning programming class.

java GridCreator

Grid.java
GraphicGrid.java
GridCreator.java
GridConqueror.java

2010/01/28 03:20 2010/01/28 03:20

질긴 뉴질랜드 인연 ㅋㅋ

Posted at 2010/01/13 17:43 in [Diary]
뉴질랜드를 99년도에 갔던거 같은데... 벌써 10년도 지난 일이네 -0-
잠깐 있었었는데 그때 인연들이 이리 이어질 줄이야...

비록 토니팍은 나와 스키장 가기로 한 약속을 뒤로 한 채 한국으로 귀국했지만,
시카고에서 학교 다니는 동안 나하고 3~4번은 만난거 같고...

나 처음 미국 왔을때 DC 에서 나하고 놀아줬던 데니킴은,
지금은 켈리포니아로 이주해서 매주 금요일 마다 우리집 와서 같이 스케치북 보고... ㅋㅋ


오늘은 양효 미국 놀러왔다고 전화왔네 ㅋㅋ
이녀석은 한국에 있을때도 지방에 살아서 자주 보지도 못했는데,
미국에서 보게되다니 정말 오랜만인걸...

간만에 타운 나가서 술 한잔 마셔야겠군 !
=3
2010/01/13 17:43 2010/01/13 17:43

도재욱의 넥서스가 날라가는 순간

Posted at 2010/01/08 01:34 in [Hobbies]
사용자 삽입 이미지

한국에서 일 끝나고 집에가서 어쩌다가 티비 키면...
ongame 이나 mbcgame 에서 스타리그 봤었는데,
요즘에 보다보니 재미있어서 자주보게 되네 ㅋㅋ

도재욱의 아비터가 날라갔음에도 불구하고 EMP 한대 맞고 핵 떨어져서 넥서스가 단방에 날라가는 순간.

초반에 피해도 많이 받았는데도 불구하고 잘 극복했는데 결국에 3연패 했네.
템플러만 있었어도 이길 수 있었던 경기 같은데~
2010/01/08 01:34 2010/01/08 01:34

오래만에 포스팅 -ㅇ-

Posted at 2010/01/07 03:06 in [Diary]
조금 늦었지만 모두 새해 복 많이 받으세요~
올 한해도 건강하시고 하시는 일 모두 잘 되길 빕니다 : )


요즘에 귀차니즘에 빠져서 모든게 귀찮았는데...
오늘은 그래도 집 청소 싹 하고~ 이불 빨래도 하고 -ㅇ-
이래저래 한 일이 많네.

낮과 밤이 바뀌어서 새벽 3시가 다되어 가는데도 잠은 안오고...
내일 카운셀러도 만나야하고 수업도 가야하는데 나 지금 뭐하는거지 ㅋㅋ

최근에 친한 동생이 내 눈 앞에서 크게 다쳐서 충격도 좀 먹고...
기도 같은거 잘 안하는데 그녀석 위해서 기도도 좀 해주고...
다행스럽게도 많이 좋아져서 정말 감사한 생각이 든다.

이야기 듣어보니까, 뇌에 공기가 들어가서 위험 했었고,
눈이 실명될 수도 있었고...
정말 이래저래 고비가 많았는데 큰 고비는 다 넘겼고...
빨리 건강해져서 spring 때 좋은 모습으로 다시 볼 수 있었으면...


이번주 부터 winter 시작되서 학교 갔는데... 좀 좌절이다...
java introduction 이라니...
더군다나 첫 수업부터 쉬지않고 1시간 30분동안 떠들더니 15분간 휴식시간 준다 ㅠ.ㅠ

어디서 말 하는것만 배웠나 말은 잘하긴 하는데...
내 앞에서 byte, int, float, double 이런거 설명하면 나보고 어쩌라는건데 ㅠ.ㅠ
참다 참다 수업 시간에 클리앙 사게가서 사진 구경했다 ㅋㅋ

아... 전에 한번 CC 하고 UC berkeley 수업 비교를 해본적 있는데...
정말이지 CC 에선 배울게 거의 없는거 같다.
그냥 대부분 수업이 다 영어 공부하러 가는거 같아 ~.~
그래도 UC berkeley 에서는 몇개 흥미로운 수업이 있어보이긴 하던데...

시작한거 끝은 봐야하는데...
이 빈곤한 생활을 하면서 2년이나 더 버텨야할 생각하니까 깝깝하네 ㅋ


고생 끝에 낙이 있다니 화이팅 해야지!! =3
2010/01/07 03:06 2010/01/07 03:06