学年

教科

質問の種類

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

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

()のなかで当てはまるものを教えてください。 お願いします。

lounon 01. (Can/May) I ask where (do you come from/you come from)? 02. Today I (shall be working/will work) after school. 03. Do you want to go with usi i would/can) if (could/would/can) but I (couldn't/wouldn't/can't). 04. To the extent he was able, our English composition teacher taught us (construction/ to construct) a group of words with a (completed/completing) thought, a sentence. 05. If I (am/is/are/was/were) asked a question in English, I try to answer in English. 06. He (has eaten/had eaten/ate) breakfast by the time he left the house. 07. What (will/would/can/could) you choose if you (will/would/can/could) choose between Pascal's wager and cryonics? 08. If I (am/is/was/were) a rich man, 1 (could/can) build a five story house. og. If I (was/were) speeding, I slowed down. 10. If I (am/was/were) a king, my wife (would have been/would be) my queen. 11. Would you please tell me what (is your name/your you mind lending me a hand? 13. I (couldn't/can't) see well for the snow was so heavy. 14. (After having/When became/had become) the shift manager. 15. The doctor would not (have given/give) vaccinations (would of/would have/had) (he/she) is)? 12. (Would/Could) name 1) worked part time a few weeks, I (have become/ (know/knew/known) (because/that) they (have/had) never been (proved/proven) to save a single life. 1-03 1-04 (spoken/speaking).

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

文章を読んで上の1〜4の問題を解くものです。 分からないのでお願いします

3. Answer the following questions. 1 What is the difference between UNIX and Linux? 2 3 4 Choose one of the words in italics in the text. What is the definition of the word you have chosen? What are the three levels of a Linux system? What are the two main functions of the kernel? [Reading Text] UNIX was initially developed by researchers at Bell Labs in the 1970s. Today, UNIX and its variants are widely used mainly on servers. By far, the most well- known UNIX-like operating system is Linux. Linux is available in different distributions which include the Linux kernel and different collections of software. These distributions have various user interfaces, many experienced users preferring the command-line interface, or shell. Linux distributions include a range of software including text editors. memory. While the mechanics of Linux and other Unix operating systems are complicated, the components of a Linux system can be grouped into three levels. The lowest level is the hardware, such as Central Processing Unit (CPU) and The next level is the kernel. It enables communication between hardware and software, by providing instructions to the CPU and other hardware. The programs that are running on the system, or processes, make up the top level known as the user space. Processes in user space generally only have access to a restricted amount of memory and operations, this is called user mode. The kernel runs in kernel mode which allows it unrestricted access to hardware resources. The kernel provides functions such as process management and memory management. A computer only has limited Random Access Memory (RAM) and processor cores. Process management allows the system to run multiple programs (processes) at the same time even if the CPU can only execute only a few processes at a time. Memory management allows applications to share the system's memory while avoiding potential issues such as memory leak. Included with the kernel are device drivers that provide an interface for applications to communicate with hardware, such as hard drives. System calls allow user processes to access features that are executed at kernel mode, for example creating new processes.

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

この1〜4の問題お願いします🙏🏼🙏🏼

3. Answer the following questions. 1 What is the difference between UNIX and Linux? 2 3 4 Choose one of the words in italics in the text. What is the definition of the word you have chosen? What are the three levels of a Linux system? What are the two main functions of the kernel? [Reading Text] UNIX was initially developed by researchers at Bell Labs in the 1970s. Today, UNIX and its variants are widely used mainly on servers. By far, the most well- known UNIX-like operating system is Linux. Linux is available in different distributions which include the Linux kernel and different collections of software. These distributions have various user interfaces, many experienced users preferring the command-line interface, or shell. Linux distributions include a range of software including text editors. memory. While the mechanics of Linux and other Unix operating systems are complicated, the components of a Linux system can be grouped into three levels. The lowest level is the hardware, such as Central Processing Unit (CPU) and The next level is the kernel. It enables communication between hardware and software, by providing instructions to the CPU and other hardware. The programs that are running on the system, or processes, make up the top level known as the user space. Processes in user space generally only have access to a restricted amount of memory and operations, this is called user mode. The kernel runs in kernel mode which allows it unrestricted access to hardware resources. The kernel provides functions such as process management and memory management. A computer only has limited Random Access Memory (RAM) and processor cores. Process management allows the system to run multiple programs (processes) at the same time even if the CPU can only execute only a few processes at a time. Memory management allows applications to share the system's memory while avoiding potential issues such as memory leak. Included with the kernel are device drivers that provide an interface for applications to communicate with hardware, such as hard drives. System calls allow user processes to access features that are executed at kernel mode, for example creating new processes.

回答募集中 回答数: 0
1/5