Grade

Subject

Type of questions

IT Undergraduate

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プログラムの中で明示的にフ ァイルに出力することもできるので すがここでは安直な方法を取ります

Unresolved Answers: 1
TOEIC・English Undergraduate

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

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.

Resolved Answers: 1
TOEIC・English Undergraduate

8番ですが、本文の内容に合っているか合っていないか、どちらにもとれそうで迷っています。 教えていただきたいです。

20 D 007 feel guilty about eating so much. People tease me for being fat and I pretend it Hello Sarah) I've put on a lot of weight recently. I make myself sick when I doesn't bother me, but I cry myself to sleep. My family says nasty things about my size, too. Please help me lose weight. 5 15歳の女の子の悩みの相 Barbara, 15 Sarah says: Hello, Barbara. Please try to stop making yourself sick. Beauty comes from within and in all shapes and sizes. The main thing is to be healthy. This can be done through your diet and by exercising. (It's unkind of your family to tease but pl" t ↳ To Tease 10 maybe they don't know that it upsets you So tell them how you feel. Ask your mom to help you follow a healthy, low-fat diet. Cut back on potato chips, cakes and sweets. Why not take up swimming or jogging? By eating healthily and exercising, your body will naturally reach a healthy weight. Don't skip meals, go on a crash diet, or make yourself sick. You may damage your body 15 if it doesn't receive the right nutrients. If you can't talk to your mom, your doctor will help. If you are unable to stop making yourself sick, call the Eating Disorder Association Helpline. Eating Disorder Association Helpline 01603765 050 Monday-Friday, between 4 p.m. and 6 p.m. Email: eda@netcom.co.uk

Waiting for Answers Answers: 0