学年

教科

質問の種類

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

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

文章を読んで上の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
数学 大学生・専門学校生・社会人

小論文の添削お願いします

No. Date 近年グローバル化や少子高齢化が進んでいる。また世界には ●障害を持った体を十分に動かせない方もいる。そのためすべて の人に同じ対応をしていても十分に満足できない人もいる。そ のような状態になることで普段とは違う状況にストレスを感じ てしまうだろう。そのため安心して生活するためには不自由な く生活できる環境が必要なのではないだろうか。 近年ではグローバル化が進んでおり、日本に住む外国人も増 えてきた。日本語を日常的に使える程話せたり、読み書きを出 来る方もいるがそうでない方も多くいる。私が京都に修学旅行 に行った時に観光をしている外国に英語でインタビューをする という課題があったのだが、私の知らない言いまわしなどがいく つかあった。つまり言葉が通じないというだけで十分にストレ スにつながってしまうのではないだろうか。次いで少子高齢化 ○についても考えていこうと思う。少子高齢化も近年では問題視 されていることだが、一般的に高齢者は若ものに比べ体が弱く ○人で出来る事も少なくなってしまうだろう。私のおばあちゃん C は元気な方ではあるが牛乳や米など重いものを買う時は私に手 伝いをお願いしている。また、障害を持った方なども一人で出 ○来ない事などがあるだろう。そこでそのような人達でも生活し やすい環境が必要だと考える。 すべての方が不自由なく生活するために私は二つの方法を考 ○えた。まず一つ目はバリアフリーな施設である。外国の方は白 本人に比べ体の大きい人が多い。そのため天井を少し高くした り、風呂を広くすると良いだろう。また、高齢者や車イスを使 う方などは段差があると大変なので階段ではなくスロープを作っ たり、車イスのまま移動が出来る空間造りが必要だと思う。二つ ●目はユニバーサイデザインを使用する事である。日本語の文字 O を読む事が出来ない外国人や小さなお子様でも分かりやすい フクトグラムなどを使用することで不慣れな環境でも生活しやす ○いだろう。 以上の点から避難した人々が不安なく安全に生活するために は一人一人に合った不自由がなく生活できる環境が必要である。 KOKUYO LOOSE-LEAF ノ-836BT 6mm ruled x36 lines

回答募集中 回答数: 0