学年

教科

質問の種類

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

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

自分の回答と照らし合わせて確認したいので、答えがなにになるかどなたか教えてください。 解説もあると助かります。

5 A Matter of Taste Reading Passage 042 At the age of just 22, Jamie Oliver became well known across the UK as "The Naked Chef." He called himself this not because he cooked wearing no clothes, but because he wanted to simplify food preparation so that everybody could follow his recipes. He wanted to "strip down" the idea of cooking. Since then he has had numerous TV shows, published 50 many books, and has become a household name in the UK. Today, one of the activities Jamie Oliver is best known for is his great effort to improve the school dinners that children eat every day. One day, he visited the kitchen of a typical London secondary school, and he was shocked to see how much processed junk food the kids were given to eat each day. Fat and sugar levels were extremely high, and nutritional values very 10 low. The "turkey twizzler" became the symbol of these unhealthy meals: processed meat containing 21.2% fat and only 34% actual turkey. Oliver ran the school kitchen for one year and tried to show that it was possible to serve healthy meals on a limited budget—and that kids actually enjoyed eating them. His mission was to radically change the eating habits of children in that school, and across the country. 150 200 15 20 25 CULTIES 250 His project (the "Feed Me Better" campaign) has had some influence on school dinners in the UK. After watching the documentary Jamie's School Dinners, 271,677 people signed a petition calling for healthier school meals. This led the Prime Minister to agree to spend 280 million pounds (about 37 billion yen) on school dinners, to ban some junk food from school menus, and to create a School Food Trust to provide support and advice for people preparing school meals. Research, by the way, shows that children who stop eating sugary, fatty food and instead eat Oliver's school dinners are better behaved in class, and they get higher test 300 scores, too. 350 Of course, the project has had some problems. At first, many students (and even parents) resisted the removal of the junk food they were so used to. In one famous instance, some parents were passing local takeaway food to their children through the school fence. Also, schools that followed the plan for a while were often found to gradually drift back into bad habits. After all, it is easier and cheaper to just give the kids junk food. However, Oliver's efforts represent a positive start, and with obesity becoming such a huge problem (see Unit 4), 400 it's a very necessary start.

解決済み 回答数: 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
1/8