Lv 1198 points

Future

Favorite Answers0%
Answers14
  • 撞球數學題 球從左上角落出發 最後落入哪個袋

    撞球數學題

    長260*寬120的撞球桌

    球從左上角落往右下45度角打出球 最後會進哪一個袋? 球直線前進 請把路線與算法寫出

    ●───────────●──────────●

    │口口口口口口口口口口口口口口口口│

    │口口口口口口口口口口口口口口口口│

    │口口口口口口口口口口口口口口口口│

    │口口口口口口口口口口口口口口口口│

    ●───────────●──────────●

    PS:因排版關係,框框內的"很多口"表示為桌面,中間的兩●為中袋

    3 Answers數學8 years ago
  • 給L平方 算出L (只能用一把尺和一個圓規)

    只能用一把尺(15cm)和一個圓規

    給L平方(介於1~10cm) 如何算出L?

    感謝各位大大

    3 Answers數學8 years ago
  • [Java]關於這網站的製作

    關於這網站的製作

    http://maven.smith.edu/~thiebaut/java/sort/demo.ht...

    源自於D. Thiebaut, -- Smith College

    的SORTING ALGORITHMS

    會介紹各種排序的動畫解說

    關於這網站的製作

    除了運用到JAVA之外

    還需要什麼工具嗎?

    例:是用J2SE寫出再把程式碼放到網站上?或是用到dreamweaver或是需PHP DATABASE之類的?

    若專題想製作出這個會太容易嗎?還是會太難

    請大大們幫我分析一下

    謝謝

    3 Answers程式設計1 decade ago
  • appache 右下角沒顯示圖示

    我灌好了appserve

    在執行appache的時候

    它顯示

    Apache 2.2 daemon is Starting ...

    ##########################################

    ## Stop Apache Please Close This Window ##

    ##########################################

    (OS 10048)一次只能用一個通訊端位址 (通訊協定/網路位址/連接埠)。 : make_sock: co

    uld not bind to address 0.0.0.0:80

    no listening sockets available, shutting down

    Unable to open logs

    請按任意鍵繼續 . . .

    右下角就是沒有顯示羽毛圖案

    為什麼會這樣

    請大大們幫幫忙解答

    謝謝

    1 Answer電腦網路1 decade ago
  • 英文 檢查短文文法、結構、組織

    這裡有一篇我寫的個人自我介紹

    http://blog.xuite.net/boy210055/boy/24194707

    麻煩大大們幫我看看文章有沒有文法錯誤

    結構上跟組織上的問題

    還有哪裏應該怎麼修改比較好

    這篇是打算面試時用的自我介紹

    麻煩大大們幫幫忙

    謝謝

    2 Answers語言1 decade ago
  • java 用stack檢查大括號{} 有沒有成對

    要怎麼用stack檢查某程式裡面的符號如{} () [] <>有沒有成對呢

    如果沒有成對則顯示false呢

    請大大們幫幫忙

    順便說明一下吧

    1 Answer程式設計1 decade ago
  • java 繼承跟多型的問題

    Truck 跟 Motorcycle 是 Vihicle的子類別

    判斷下列些是valid或invalid

    分號後面是我認為的答案

    Truck t = new Vehicle(); =>invalid

    Vihicle v = new Truck(); =>valid

    Motorcycle m1 = new Vehicle(); =>invalid

    Motorcycle m2 = new Truck(); =>不確定

    前三題的答案我認為是這樣

    旦第四題我不確定是什麼

    請大大們幫幫忙

    並解說一下 謝謝

    2 Answers程式設計1 decade ago
  • 西班牙話 短句翻成西班牙唸法

    中文:今天我要介紹西班牙的宗教和社會

    英文:Today, I'm going to introduce the religion and society in Spain

    這句翻成西班牙要怎麼唸呢?

    有羅馬拼音更清楚越好

    麻煩高手解答一下

    謝謝

    2 Answers語言1 decade ago
  • java File I/O 問題

    1. Write an application that randomly generates N integers and stores them in a binary file integers.dat. The value for N is input by the user. Open the file with a text editor and see what the contents of a binary file look like.

    2. Write an application that reads the data from the file integer.dat generated in Exercise 1. After the data are read, display the smallest, the largest and the average.

    第二題是延伸第一題,顯示出最小值 最大值 和平均數

    麻煩大大們幫幫忙

    20點

    2 Answers程式設計1 decade ago
  • JAVA 計算sort 時間

    public class testtime

    {

    public static void main(String[] args)

    {

    int x;

    long elapsedtime;

    Date starttime = new Date();

    for (int j = 1; j <= 100; j++)

    {

    for (int i = 1; i <= 10000000; i++)

    {

    x = 3;

    //do some timing ...

    }

    }

    Date endtime = new Date();

    elapsedtime = endtime.getTime()- starttime.getTime();

    System.out.println(elapsedtime);

    }

    }

    有大大能解釋這段程式碼嗎?

    越詳盡越好

    如果要把這程式套用到計算Selection sort的時間

    要如何套用呢??

    1 Answer程式設計1 decade ago
  • java 用array做月曆

    要怎麼用array做出2009年的月曆呢

    能夠一次把一到十二月的月曆顯示出來

    請大大們幫幫忙吧

    1 Answer程式設計1 decade ago
  • java 河內塔 內含程式碼

    import java.io.*;

    public class Hanoi {

    public static void main(String args[]) throws IOException {

    int n;

    BufferedReader buf;

    buf = new BufferedReader(new InputStreamReader(System.in));

    System.out.print("請輸入盤數:");

    n = Integer.parseInt(buf.readLine());

    Hanoi hanoi = new Hanoi();

    hanoi.move(n, 'A', 'B', 'C');

    }

    public void move(int n, char a, char b, char c) {

    if(n == 1)

    System.out.println("盤 " + n + " 由 " + a + " 移至 " + c);

    else {

    move(n - 1, a, c, b);

    System.out.println("盤 " + n + " 由 " + a + " 移至 " + c);

    move(n - 1, b, a, c);

    }

    }

    }

    跑出結果:

    請輸入盤數:3

    盤 1 由 A 移至 C

    盤 2 由 A 移至 B

    盤 1 由 C 移至 B

    盤 3 由 A 移至 C

    盤 1 由 B 移至 A

    盤 2 由 B 移至 C

    盤 1 由 A 移至 C

    我的問題是在move的method

    可以告訴我他裡面的原理嗎?

    他裡面沒有迴圈為何能印出這麼多行資料

    麻煩大大們幫忙解答吧

    此程式碼來自:

    http://caterpillar.onlyfun.net/Gossip/AlgorithmGos...

    2 Answers程式設計1 decade ago
  • JAVA method的問題(棋盤格) 含程式碼

    import javax.swing.*;

    import java.awt.*;

    public class GraphPaper extends JFrame {

    Color color;

    // class constants

    private static final int FRAME_SIZE = 600;

    private static final int NUM_SQUARES = 10;

    private static final int SQUARE_SIZE = FRAME_SIZE/NUM_SQUARES;

    // private instance variables

    private Point [] [] graphPoints;

    public static void main (String [] args) {

    GraphPaper gp = new GraphPaper();

    }

    public GraphPaper() {

    super("Graph Paper");

    setSize(FRAME_SIZE, FRAME_SIZE);

    setVisible(true);

    //setBackground(Color Green);

    graphPoints =

    new Point [NUM_SQUARES+1][NUM_SQUARES+1];//[11] [11]

    for (int r = 0; r < graphPoints.length; r++)

    for (int c = 0; c < graphPoints[r].length; c++)

    graphPoints[r][c] =

    new Point (c*SQUARE_SIZE, r*SQUARE_SIZE);

    }

    public void paint (Graphics g) {

    for(int r = 0; r <= NUM_SQUARES - 1; r++)

    for(int c = 0; c <= NUM_SQUARES - 1; c++)

    g.drawLine(graphPoints[r][c].x, graphPoints[r][c].y, graphPoints[r+1][c].x, graphPoints[r+1][c].y);

    for(int r = 0; r <= NUM_SQUARES - 1; r++)

    for(int c = 0; c <= NUM_SQUARES - 1; c++)

    g.drawLine(graphPoints[r][c].x, graphPoints[r][c].y, graphPoints[r][c+1].x, graphPoints[r][c+1].y);

    //JOptionPane.showMessageDialog(null, "Click OK to exit");

    //System.exit(0);

    }

    我要問的問題

    在mian或constructor裡面都沒有呼叫 public void paint (Graphics g)這個method的,請問這個程式是從哪裡執行那個method的

    請大大們幫幫我解說一下吧~~謝謝

    2 Answers程式設計1 decade ago
  • JAVA-陣列迴圈問題

    public class Demo {

    public static void main (String [] args) {

    StringBuffer[] a;

    a = new StringBuffer[4];

    a[0] = new StringBuffer("Sasparilla");

    for (int i = 1; i < 4; i++)

    a[i] = a[0];

    a[3].setCharAt(0, 'J');

    for(int i = 0 ;i < a.length ;i++){

    System.out.println(a[i]);

    }

    }

    }

    /*

    Jasparilla

    Jasparilla

    Jasparilla

    Jasparilla

    */

    疑問: 在其中一行 a[3].setCharAt(0, 'J');

    為什麼他只改了陣列a[3]的字首為J

    其他像a[0[, a[1], a[2]也跟著跟改了呢??

    麻煩大大幫我解答吧~~

    2 Answers程式設計1 decade ago
  • java 天氣溫度的array問題

    Design a WeatherBureau calss that manages a collection of weather data.

    A bundle of 3X5 cards with daily temperature data on them. You may not sort them. Three data items on a card: day of month, the low temperature for that day, and the high temperature for that day.

    Some cards might be missing a low or a high temperature. Some cards are missing for some days in the month. Days are range of 1 to 31.(我不太懂這句的含意 那些missing的卡需要設計嗎,我個人絕得是可以省略它)

    主要設計問題在這

    Design and write a program to:

    1. Print out the data after it is entered in a nice report.

    2. Report the lowest high, highest high, and the day on which it occurred.

    3. Report the highest low, lowest low and the day on which it occurred.

    4. Report the average of the lows and highs, (two separate averages)

    5. Finally report each low with its day in order from largest to smallest. (hint do not sort the array). You may use only two arrays of integer of size 32. No other arrays are allowed.

    主要前四點我大致上都會

    主要是第五點

    我不太懂它是什麼意思

    拜託大大們幫幫忙~~~

    3 Answers程式設計1 decade ago
  • JAVA ASCII Caesar cipher問題

    Caesar cipher

    Each character in the original message is shifted N positions. For example, if N = 1, then the message:

    I drink only decaf

    becomes

    J!esjol!pozmz!efdbg

    Shifting N positions forward and backward is achieved by converting the character to ASCII and adding or substring N.

    Write an application that reads in the original text and the value for N and displays the encrypted text.

    Make sure the ASKII value resulting from encryption falls between 32 and 126. For example, if you add 8(value for N) to122(ASCII code for’z’), you should “wrap around” and get 35.

    Write another application that reads the encrypted text and the value for N and displays the original text by using the Caesar cipher technique. Design a suitable user interface.

    問題挺長的(有擷取重點)

    但應該是純粹Caesar cipher的問題

    麻煩大大們幫忙

    1 Answer程式設計1 decade ago
  • java class相關

    完成下列的 constructor

    class Student{

    private String name;

    private int age;

    private Address address;

    public Student (String name, int age, Address address){

    //assign passed values to the data members

    }

    麻煩大大解答

    謝謝

    1 Answer程式設計1 decade ago
  • JAVA class問題

    Consider the following class

    class Modifier {

    public static void change(int x, int y){

    x = x - 10;

    y = y + 10;

    }

    What will be an output from the following code?

    int x = 40;

    int y = 20;

    Modifier.change(x,y);

    System.out.println("x = " + x);

    System.out.println("y = " + y);

    答案是什麼呢

    並請解說為什麼是這答案

    因為我都迷糊了

    請大大幫忙解答

    3 Answers程式設計1 decade ago
  • 數學證明題-數學歸納法n^3 =6

    數學證明題

    請用數學歸納法

    證明

    n^3<n! for all n>=6

    請大大們幫幫忙

    2 Answers數學1 decade ago
  • 數學證明題-數學歸納法log3n<3^n

    用數學歸納法證明

    log3n<n^3 for all n >=1

    2 Answers數學1 decade ago