学年

教科

質問の種類

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

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
TOEIC・英語 大学生・専門学校生・社会人

英読解の問題です。 すっかり忘れてしまったため何も分かりません。 2問教えて欲しいです。お願いします><

2022 P=HT 6. 次のお知らせを読み、 (1) ~ (2) のA~Dで適切なものに○をつけなさい。 [4×2=8] TO: All staff From: Erin Liner, Manager Date: July 15 Subject: Our survey Dear all. We have finished reviewing the data which we received from the recent customer satisfaction survey. I would like to share the most important findings, and how we can improve on certain areas of our work. Overall, customers were happy with the quality of our service. the helpfulness of our staff, and the range of products we offer. However, there were some negative comments which we can begin to work on. A common complaint was that there are not enough foreign titles in the store, especially Japanese comics. I will ask John Calman to research some of the most popular series and make sure we start carrying them from the fall. As Gita Pradesh spent her college years in Tokyo, I will ask her to assist. Better signage was another thing which people wanted. They spend a lot of time looking for the right section and it frustrates a lot of customers. This is something we can improve immediately, so I will speak to Alice Moore today about making the signs easier to see, and adding more if necessary. Finally, we got some comments about having a small cafe in the store. Nowadays, people want to have a coffee while reading or browsing, and it could be a new source of profit. Mario Venetti will make a report on the feasibility and deliver it next month. Thank you for all your efforts in making us the best we can be. Erin Liner Manager (1) What is the purpose of the e-mail? (A) To ask staff to create survey questions (B) To share details of customer feedback (C) To inform staff of recent changes (D) To invite staff to apply for new positions (2) Where does Ms. Liner most likely work? (A) At a café (B) At a movie theater (C) At a clothing shop (D) At a bookstore 以

回答募集中 回答数: 0