学年

教科

質問の種類

情報 大学生・専門学校生・社会人

vsコードを使ってJava言語の勉強をしてたんですけど初心者すぎて何が原因で上手くコードの実行ができてないのかわかりません… 勉強の資料として使ってるのは京都大学のJavaによるプログラミング入門 です。

17:43 7月27日 (木) 1.7 使用するサンプルプログラム (TankCalculator.java) 1: public class Tank Calculator { 2: public static void main (String args[]){ final double FLOW_RATE = 1.0; final double TANK_AREA = 20.0; final double INITIAL_LEVEL = 10.0; double time; //s double tankLevel; //m ... ocw.kyoto-u.ac.jp 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: time = 30; 14: tankLevel = INITIAL_LEVEL + FLOW_RATE*time/TANK_AREA; 15: System.out.println("Tank Level at time "+ time + "s = " + tankLevel + "m"); 16: 17: 18: 19: } 20:} 11 System.out.println("Flow Rate = + FLOW_RATE + "m** 3/s"); System.out.println("Tank Area=" + TANK_AREA + "m**2"); System.out.println("Initial Level = " + INITIAL_LEVEL + "m"); time = 60; tankLevel = INITIAL_LEVEL + FLOW_RATE*time/TANK_AREA; System.out.println("Tank Level at time "+ time + "s=" + tankLevel + "m"); 【補足】 // の後ろは,プログラムを後で読解しやすくするための注釈です. Flow Rate = 1.0m**3/s Tank Area = 20.0mm**2 Initial Level = 10.0m 8 Tank Level time 30.0s = 11.5m Tank Level at time 60.0s = 13.0m 1.7.1 サンプルプログラムの入力と実行 先ほどと同じように, 秀丸エディタを開き, 20行のプログラムを書き込んで, Tank Calculator.java と名付け, 保存して, コンパイル, 実行してください. 成功すれば,以下の実行結果が示されます。(失敗してもめげないで, 2.5.1 節を参 考に、原因を考え,再トライしてください) ちなみに, 実行結果をファイルに書き出すにはコマンドプロンプトの「リダイレク ト」 という機能を使います 11. java TankCalculator > result.txt これにより result.txt というファイルが出来ているはずです。 中身は数値や文字列 だけのテキストファイルですのでエディタなどで内容を確認できます。 @91% 11javaプログラムの中で明示的にフ ァイルに出力することもできるので すがここでは安直な方法を取ります

未解決 回答数: 1
物理 大学生・専門学校生・社会人

高校レベルの物理の問題です。 答えは出したのですが、解答と合わなかったので最後の問題の解き方を教えてください。

空気抵抗とは空気との接触により運動を妨げようとする力のことであり、運動している物体の速さ (速さの1乗) に比例する粘性抵抗と速 さの2乗に比例する圧力抵抗がある。 雨が圧力抵抗のみを受けながら鉛直下向きに落下する様子を考える。 圧力抵抗の比例定数を重 力加速度の大きさをg [m/s²]として以下の問に答えよ。 V 問31 鉛直下向きを正として雨の加速度をa [m/s'] としたとき、 速さ [m/s]で落下している雨滴の運動方程式はどのように記述され るか。 適切なものを1つ選べ [31] ① ma = mg + kv² (2) ma=-kv (3) ma = -kv² (6) ma=mg- ・kv (7) ma = mg-kv² ⑧ ma-mg 問32 比例定数kの単位はSI単位でどのように表されるか。 適切なものを1つ選べ。 [32] ① N·m ②N・s ③kg·m ⑥ N/m ⑦ N/s ⑧kg/m ①kmg mg k ② 月 33 雨滴は地表付近では等速度運動をする。 そのときの速度 (終端速度) Pt [m/s] として適切なものはどれか。 1つ選べ。 [33] mg -1 (半径に反比例) img k 5 1 (半径の1乗に比例) ④kg's ⑨kg/s 1km g 30 (半径に関わらず一定) 4 ⑧ 0 34 圧力抵抗の比例定数kはp を空気の密度、S を物体の断面積として、以下の関係がある。 x=2/cos CpS 4 ma = kv 9 ma = mg - 12/1 (半径の平方根に反比例) ⑤m/s² ⑩ 単位無し ここで、Cは物体の形状に依存する係数であり、 球の場合はおよそ 0.5 となる。 雨滴の形状が球だとして、終端速度は雨滴の半径の何 乗に比例するか。 適切なものを1つ選べ。 [34] ⑥⑥/12 (半径の平方根に比例 62 (半径の2乗に比例) ⑤ ma=kv² 10ma = mg + kv kv²=mg V = long fals い JAL = der²tu Img_ 11 4mg erin 4mg en F√ √

回答募集中 回答数: 0
TOEIC・英語 大学生・専門学校生・社会人

答えを教えてください! よかったら,根拠も教えてください

la vitbl Questions 4-7 refer to the following letter. January 10 Ms. Erin Murphy Customer Service Department Westcoast Airlines Major Miles Program 345 Brook Street Dallas, TX 75218 Dear Ms. Murphy, As per your request during our telephone conversation on January 8, I am sending you Los Angeles International Airport last December. Please note that my ticket was upgraded itinerary and ticket number for my recent roundtrip flight from JFK International Airport business class with a Major Miles Gold Class voucher and should therefore be eligible f full business class mileage credit. 62 Section Il over 15 years. I must confess that I find the new restrictions to your flight voucher pla I am a Gold member in the Major Miles program and have been a Westcoast customer 1 genuinely confusing. I fail to understand why the burden of proof for my mileage cred rests with me. Shouldn't this information be on your ticketing computer? This was my itinerary. MD My ticket number was #YB42565697. Departed JFK, December 22 at 10:20 for LAX Returned to JFK from LAX on December 29 at 16:40 My seat number was 14B. 7B My Major Miles number is # 04356721 (Gold Card). I sincerely hope that this issue will be resolved quickly as I am counting on my miles eame during this trip to upgrade my hotel room next May. Thank you very much for your attention in this matter. Sincerely Yours, Jarrod Watkins Jarrod Watkins 4. 5. 6. What does Ms. Murphy do? (A) She makes airline reservations. (B) She deals with unhappy customers. (C) She issues new tickets. (D) She upgrades people to business class. What is the purpose of this letter? (A) To upgrade his ticket to business class (B) To buy a flight upgrade coupon (C) To complain about his seat reservation (D) To receive more mileage credits How does Mr. Watkins feel about the new frequent flier program rules? (A) He would like them to be simpler. (B) He believes they are unfair. (C) He finds them to be convenient. (D) He hopes that they will benefit hold Card members more. Which of the following is NOT mentioned in the letter? (A) His ticket number (B) His frequent flier level (C) His credit card number (D) His flight information inq M:8 big en enthovenot cold w lar hud,mq 01X in jord is di Hal Unit 2: Letters, E-mails, & Text message chains 63

回答募集中 回答数: 0