jaVA高手幫幫忙~~
我這禮拜四要交作業還不知道要如何寫
我們上的是原文書
題目
我用線上翻譯翻的
寫 確定 為 對 整數 的 一 個 方法 倍數 是否 第 二 個
整數 是 倍數 的 一 。 方法 應該 採取 二 個 整數 論據 和 退回 真實 如果
秒鐘 是 倍數 的 一 和 假 的 否則 。合併 這 個 方法 附屬 程式 那 輸入 一系列 的 對
整數 (一對 一 次使用 JTextFields) 。 [ NOte:Register 為 事件 處理 在 唯一 第 二 JTextField 。 用戶 應該 與 節目 相處 融洽 由 鍵入 的 數字 在
JTextFields 並且 按 進入 只 在 第 二 JTextField 。]
原文
Write a method multiple that determines for pair of integers whether the second integer is a multiple of the first. The method should take two integer
arguments and return true if the second is a multiple of the first and false otherwise.Incorporate this method into an applet that inputs a series of pairs of integers (one pair at a time using JTextFields). [ NOte:Register for event handling on only the second JTextField. The user should interact with the program by typing numbers in both JTextFields and pressing Enter only in the second JTextField.]
|