-->

2008年2月3日 星期日

我的九型人格分析

九型人格分析
第八型領袖型、能力型、挑戰者、保護者、權威型
13%
第七型快樂主義型、豐富型、活躍型、創造可能者、享樂型
13%
第二型助人者、全愛型、助人型、成就他人者、博愛型
13%
第四型藝術型、浪漫者、自我型、憑感覺者
12%
第三型成就者、事業型、成就型、實踐型
11%
第九型和平型、和平者、和諧型、維持和諧者
11%
第六型忠誠型、忠誠型、尋找安全者、謹慎型
10%
第一型完美主義者、完美型、改革者、改進型、秩序大使
10%
第五型智慧型、觀察者、思想型、理性分析者、思考型
8%

 
你擁有很多當領袖的特質:豪爽、不拘小節、自視甚高、遇強越強、關心、正義、公平。你清楚自己的目標,並努力前進。由於不願被人控制,且具有一定的支配力,所以你很有潛質做領袖帶領大家。由於你好勝性格,有時侯會對人有點攻擊性,讓人感到壓力。
 
主要特徵:
控制個人的佔有物和空間,控制那些可能影響自己生活的人。
具有進攻性,公開表達自己的憤怒。 。
關注正義,喜歡保護他人。
把打架和性愛當作與他人接觸的方式。相信那些在正面衝突中不退縮的人。
把過度看作克服厭倦的良藥。夜生活、瘋狂娛樂、徹夜狂歡、暴飲暴食……
難以意識到自我的依賴性。當別人愛上他們時,他們會通過各種方式拒絕真實情感,比如離開、認為無聊或者暗自譴責自己對他人的誤導。
常常把所有事物極端化。
缺乏對自身弱點的認識。
 
代表人物:當奴‧杜林普

2008年1月11日 星期五

Lab Hanoi Tower

The pseudocode for Hanoi Tower is as follows:

Solve(N, Src, Aux, Dst)
if N is 0 return
Solve(N-1, Src, Dst, Aux)
Move N from Src to Dst
Solve(N-1, Aux, Src, Dst)


Write the Java program based on the pseudocode in the above.
 

Lab Factorial

Write a Java program that computes N! where N is a positive integer.

Hint:

public static long factorial(int n)

lab recursive method

Write a recursive method to compute Fibonacci series.

Hint:

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

Bonus: Modular Sorting

Write a sort method which takes a double array as parameter
and returns the sorted array. Call this method in a main program.

Hint: The lab is a rewriting of Lab Sorting
to make the sorting procedure a reusable method.
 

Lab Array

Study Display 6.1, and then write a program that can sort numbers in ascending order.
 

Lab Magic Parking Tower

A parking tower is out of order someday. If you park a Benz, you will end up with a Torben. Write a program to simulate this scenario. First create a class called CarParked which has a static method called outOfOrder. Name an object called yourCar, which happens to be a Benz. Your program should contain a class called CarParked and a test program called CarParkedDemo which test the method by CarParked.outOfOrder(yourCar).

Hint: You may study Display 5.14 to get some ideas.
 

Lab: Static Method II

Define a Complex class with a static method for computing complex addition. Use (2+3i)+(4+5i) in your test.
 

Homework 12/21/2007

Design a method that can compute the vector inner product. You must define Vector class in the first place. Write a demo program to verify your program works. You should use constructors to initialize the two vectors.

Hint: The inner product is not a vector. It is a number (scalar).

Sample answer
 

Lab Static Method

Study Display 5.2.
Using static variables and static methods to implement the class Fibonacci such that
the first call to Fibonacci.next()
returns 2, the second returns 3, and then 5, and so on.