473,326 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

java exercise - move 5 times

i have this exercise for class where im supposed to move 5 times. this is what i have so far but im told my another classmate im supposed to write it in code i dono what he means. anyone help?

this is what i have so far

Expand|Select|Wrap|Line Numbers
  1. class MoveFiveTimes
  2.  
  3. {
  4.     public static void main(String[] args)
  5.     {
  6.         /*
  7.         lower();
  8.         raise();
  9.         move();
  10.         turn();
  11.         circle();
  12.         */
  13.         lower();
  14.  
  15. for(int i = 0; i < 5; i++)
  16. {
  17.     move();
  18. }
  19. raise();
  20.  
  21. }
  22.  
  23. public static void lower()
  24. {
  25.     System.out.println("lower");
  26.  
  27. }
  28. public static void raise()
  29. {
  30.     System.out.println("raise");
  31.  
  32. }
  33. public static void move()
  34. {
  35.     System.out.println("move");
  36.  
  37. }
  38. public static void turn()
  39. {
  40.     System.out.println("turn");
  41.  
  42. }
  43. public static void circle()
  44. {
  45.     System.out.println("circle");
  46.  
  47. }
  48.  
  49. }
Oct 15 '08 #1
2 1384
r035198x
13,262 8TB
What are you trying to do here?
Oct 16 '08 #2
Nepomuk
3,112 Expert 2GB
That code you've posted will just print a few words. If that's all it should do, great, you're done. But I suspect, that there's something, that should be moved. The question is: What are you trying to move?

Oh, and please use [CODE ... [/code] tags when posting code here. I've added them to your post this time.

Greetings,
Nepomuk (Moderator)
Oct 16 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
0
by: Martin | last post by:
Hi All, I am a relative newbie to Java / Applets, but am despirately after some help ! I have got the following code, which is basically a listing with button items along the sides, allowing...
54
by: Spammay Blockay | last post by:
I've been tasked with doing technical interviews at my company, and I have generally ask a range of OO, Java, and "good programming technique" concepts. However, one of my favorite exercises I...
114
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
9
by: Simple Simon | last post by:
Java longs are 8 bytes. I have a Java long that is coming in from the network, and that represents milliseconds since Epoch (Jan 1 1970 00:00:00). I'm having trouble understanding how to get it...
2
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: ...
29
by: s0suk3 | last post by:
Hello, I was hoping to get some opinions on a subject. I've been programming Python for almost two years now. Recently I learned Perl, but frankly I'm not very comfortable with it. Now I want to...
2
by: cioccolatina | last post by:
Hey guys, is there anyone who could help me..? I have file ExpressionBinaryTree.java : /** class ExpressionBinaryTree * uses a binary tree to represent binary expressions * does not...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.