Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 19th, 2012, 02:35 AM
lf2killer lf2killer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 2 lf2killer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 40 sec
Reputation Power: 0
Need help making simple plotting program!!

Hello there
i just startede programming in java 1 month ago, that is why i need some help.
i have got the assignment by my teacher were we have to make a simple plotting program.

were i only move across one of the axes on a coordinate system.
sorry i can't post a link to picture :S

i have no idea what i have to do with it :S
i use jGrasp to program in.

Reply With Quote
  #2  
Old September 19th, 2012, 03:05 AM
Don475 Don475 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 7 Don475 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 54 sec
Reputation Power: 0
Someone has to know what is going on! please help

Reply With Quote
  #3  
Old September 19th, 2012, 03:32 AM
lf2killer lf2killer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 2 lf2killer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 40 sec
Reputation Power: 0
Quote:
Originally Posted by Don475
Someone has to know what is going on! please help


i have been fiddling with some code now i just want to make a straight line to start out with but i can't get it to work.
Here is my code so far:

import java.util.*;

public class Opgave4_ChristianSørensen{
public static void main (String [] args) {
System.out.println(" y-aksen");
System.out.println("- - - - - - - - - + + + + + + + + +");
System.out.println("9,8,7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8,9");
plot(-9);
plot(-8);
plot(-7);
plot(-6);
plot(-5);
plot(-4);
plot(-3);
plot(-2);
plot(-1);
plot(0);
plot(1);
plot(2);
plot(3);
plot(4);
plot(5);
plot(6);
plot(7);
plot(8);
plot(9);

}

public static void plot(int Space) {
if (Space == -9)
System.out.println("x");
else if (Space == -8)
System.out.println(" x");
else if (Space == -7)
System.out.println(" x");
else if (Space == -6)
System.out.println(" x");
else if (Space == -5)
System.out.println(" x");
else if (Space == -4)
System.out.println(" x");
else if (Space == -3)
System.out.println(" x");
else if (Space == -2)
System.out.println(" x");
else if (Space == -1)
System.out.println(" x");
else if (Space == 0)
System.out.println(" x");
else if (Space == 1)
System.out.println(" x");
else if (Space == 2)
System.out.println(" x");
else if (Space == 3)
System.out.println(" x");
else if (Space == 4)
System.out.println(" x");
else if (Space == 5)
System.out.println(" x");
else if (Space == 6)
System.out.println(" x");
else if (Space == 7)
System.out.println(" x");
else if (Space == 8)
System.out.println(" x");
else if (Space == 9)
System.out.println(" x");
else if (Space >=-9)
System.out.println("\n \n \n number has to be bewteen -9 og 9");
else if (Space <=9)
System.out.println("\n \n \n number has to be bewteen -9 og 9");

if (Space != 0)
System.out.print(" |");

}
}

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > Need help making simple plotting program!!


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap