tailieunhanh - Beginning Programming with Java for Dummies 2nd phần 3
Ust ngày hôm qua, tôi đã trò chuyện với người đầy tớ của tôi, RoboJeeves. (RoboJeeves là một mô hình cao cấp trong dòng RJ-3000 của cuộc sống-hình thức cá nhân của robot.) Đây là các cuộc thảo luận đã đi như thế nào:: RoboJeeves, cho tôi biết vận tốc của một đối tượng sau khi nó được giảm | Chapter 5 Composing a Program Jn This Chapter Reading input from the keyboard Editing a program Shooting at trouble . ust yesterday I was chatting with my servant RoboJeeves. RoboJeeves is an upscale model in the RJ-3000 line of personal robotic life-forms. Here s how the discussion went Me RoboJeeves tell me the velocity of an object after it s been falling for three seconds in a vacuum. RoboJeeves All right I will. The velocity of an object after it s been falling for three seconds in a vacuum. There I told it to you. Me RoboJeeves don t give me that smart-alecky answer. I want a number. I want the actual velocity. RoboJeeves Okay A number the actual velocity. Me RJ these cheap jokes are beneath your dignity. Can you or can t you tell me the answer to my question RoboJeeves Yes. Me Yes what RoboJeeves Yes I either can or can t tell you the answer to your question. Me Well which is it Can you RoboJeeves Yes I can. Me Then do it. Tell me the answer. RoboJeeves The velocity is 153 984 792 miles per hour. 66 Part II Writing Your Own Java Programs Me After pausing to think . . . RJ I know you never make a mistake but that number 153 984 792 is much too high. RoboJeeves Too high That s impossible. Things fall very quickly on the giant planet Mangorrrrkthongo. Now if you wanted to know about objects falling on Earth you should have said so in the first place. Sometimes that robot rubs me the wrong way. The truth is RoboJeeves does whatever I tell him to do nothing more and nothing less. If I say Feed the cat then RJ says Feed it to whom Which of your guests will be having cat for dinner Handy as they are all computers do the same darn thing. They do exactly what you tell them to do and that s sometimes very unfortunate. For example in 1962 a Mariner spacecraft to Venus was destroyed just four minutes after its launch. Why It was destroyed because of a missing keystroke in a FORTRAN program. Around the same time NASA scientists caught an error that could have trashed
đang nạp các trang xem trước