TheJonesy Posted January 8, 2009 Share Posted January 8, 2009 So, for college credit that cost me about $125, I'm taking this Advanced Placement Computer class that was recommended by my teacher. It's transferable credit that would look great for college, which is obviously why I took it. But it only "looks good" when you are actually doing good. Even though I do get perfect grades without even lifting a finger, I bust my ass in this class and am only getting by with a low grade (D+). We use NetBeans IDE 6.1 and I hate it with a passion... Unfortunately, it is only the basics. We've covered these: basic mathematical uses, if-else statements, Scanners, arrays, etc. I'm hoping people here are familiar with this and others. Don't fret if I'm not understanding the easiest things; I'm a beginner. I'll eventually need help soon = Mid-Terms! I think it's pretty user friendly. Any thoughts or comments? Link to comment Share on other sites More sharing options...
Durka Durka Mahn Posted January 9, 2009 Share Posted January 9, 2009 I know Java (and am taking an AP programming class that uses it) and I'm pretty sure that NetBeans uses it..right..? If you need any help I could help you..I'm known as the "best programmer in the class" ... heh. Link to comment Share on other sites More sharing options...
Saggy Posted January 9, 2009 Share Posted January 9, 2009 Well, what language is the IDE using? You could probably find one that you like a little better. QUOTE (K^2) ...not only is it legal for you to go around with a concealed penis, it requires absolutely no registration! Link to comment Share on other sites More sharing options...
TheJonesy Posted January 9, 2009 Author Share Posted January 9, 2009 Glad to have an expert at hand, Durka Durka Mahn! Language? I know we use Java SE if that answers your question. NetBeans is all we use, though. Our other option is using Dr. Java, which is more difficult for beginners such as myself, but works practically the same way. I'm pretty decent with programming. I'm like a large boulder; hard to get off on the start, but once I do, I'm definately rolling. I know my weakness is tests, but, then again, my teacher is hard as hell... Link to comment Share on other sites More sharing options...
K^2 Posted January 10, 2009 Share Posted January 10, 2009 Sure, I know Java. If you'll run into something you can't figure out, feel free to send me a PM. Prior to filing a bug against any of my code, please consider this response to common concerns. Link to comment Share on other sites More sharing options...
xtal256 Posted January 10, 2009 Share Posted January 10, 2009 We use NetBeans IDE 6.1 and I hate it with a passion... Really?! NetBeans is great. What don't you like about it? It maybe a bit cumbersome for a beginner but it definitely makes life a lot easier than if you use Notepad like K^2 does. It has loads of neat features; syntax highlighting, code completion, error highlighting, i could go on and on. Java was the language i first learned when i went to uni and i still love it the most, you shouldn't have too much trouble with the basics provided you have a good teacher. As for an editor, I started with plain old Notepad when i first started (1st couple of weeks) but as i got accustomed to programming i was introduced to TextPad, a small yet powerful editor that i still use today for simple programming. It's comes set up for Java so you can start using it straight away. Link to comment Share on other sites More sharing options...
K^2 Posted January 10, 2009 Share Posted January 10, 2009 I'm starting to think that Basic, Java, and C# should not be taught to people until they know how to compile C code using a pencil and an x86 manual. Prior to filing a bug against any of my code, please consider this response to common concerns. Link to comment Share on other sites More sharing options...
TheJonesy Posted January 10, 2009 Author Share Posted January 10, 2009 (edited) Oh sh*t, I'm sorry. I do agree: NetBeans is absolutely great for beginners with so much cool stuff. I think fixing any errors and the like are much easier with NetBeans. I was refering to the class itself, lol. But I must say, it challenges me and will definately prep me for college which my high school does not. As of now, we're working on a small project that deals with finding the median of input values using arrays. After that, I have to finish an even bigger project that my partner and I have started on. It's a guitar program. He set it up nice, but I went crazy trying to find a way to play audio without using an applet. Finally did. From the main, it will call a class that runs through and finds the audio needed to play whatever the user chose to play by string and fret. Then, it will ship that audio file to a class that will play it. I just need to figure out how to play multiple files simultaniously. To create the desired chord. That way, chords will play sequencially so you can play a song. Edited January 10, 2009 by TheJonesy Link to comment Share on other sites More sharing options...
xtal256 Posted January 11, 2009 Share Posted January 11, 2009 Oh sh*t, I'm sorry. I do agree: NetBeans is absolutely great for beginners with so much cool stuff. Oh, ok. And i can see why you hate the class so much. You say it's only a basic course yet you have to make a guitar program using audio and all that! Not even i know how to do audio in Java. And to play multiple files simultaneously you would need to use threads or something which i would assume you have never even heard of. But from your terminology it sounds like you know what you are talking about (or you may just be bullsh*tting it all ) Link to comment Share on other sites More sharing options...
Durka Durka Mahn Posted January 11, 2009 Share Posted January 11, 2009 (edited) Glad to have an expert at hand, Durka Durka Mahn! Language? I know we use Java SE if that answers your question. NetBeans is all we use, though. Our other option is using Dr. Java, which is more difficult for beginners such as myself, but works practically the same way. I'm pretty decent with programming. I'm like a large boulder; hard to get off on the start, but once I do, I'm definately rolling. I know my weakness is tests, but, then again, my teacher is hard as hell... You're very lucky then..my class holds me back mostly, and my teacher is the biggest push over in the world which really sucks. I wish she was a bit more demanding of her students.. So NetBeans allows you to design programs with GUI, correct? May have to get it myself, then.. EDIT: And about your partnered project, I think you actually should use applets because they are a lot easier to use for beginners and have web capability. Edited January 11, 2009 by Durka Durka Mahn Link to comment Share on other sites More sharing options...
TheJonesy Posted January 12, 2009 Author Share Posted January 12, 2009 (edited) Oh, ok. And i can see why you hate the class so much. You say it's only a basic course yet you have to make a guitar program using audio and all that! Not even i know how to do audio in Java. And to play multiple files simultaneously you would need to use threads or something which i would assume you have never even heard of. But from your terminology it sounds like you know what you are talking about (or you may just be bullsh*tting it all ) Even though we haven't covered audio at all in the class, he has helped me with it since the project relies heavily on sound. Do I know programming well? It's really for you to decide. As much as I am not happy with my grade, I'm doing fairly good compared to my other classmates. You're very lucky then..my class holds me back mostly, and my teacher is the biggest push over in the world which really sucks. I wish she was a bit more demanding of her students.. So NetBeans allows you to design programs with GUI, correct? May have to get it myself, then.. EDIT: And about your partnered project, I think you actually should use applets because they are a lot easier to use for beginners and have web capability. Yes, NetBeans allows GUI. I don't know specifics, though. We haven't covered GUI much as of now. Unfortunately, I can't use applet. Because we haven't covered audio, we also haven't covered applet either. It isn't exactly what we are working on. We've halted the projects anyway in preparation for mid-terms/exams. I'm finishing up my current homework-project dealing with finding a median. I can't seem to figure out how to put elements of Arrays in ascending order assuming the user doesn't theirself. So far, I have this: Scanner keyboard = new Scanner(System.in); //Sets a list of up to 100 digitsint[] Array = new int[100];int x = 0;int setValue;System.out.println("This program finds the median of a set of values.\nHow many values?");setValue = keyboard.nextInt();System.out.println("Enter the digits:");//Input will continue until setValue has been reachedwhile (x != setValue){ Array[x] = keyboard.nextInt(); x++; }//Various for loops and if-elses to find "temp," which represents the smallest valuefor (int i = 0; i < setValue; i++){ if (Array[i] < 0) for (i = 0; i < setValue; i++){ if (Array[i] > Array[(i + 1)]) temp = Array[(i + 1)]; else if (Array[i] < Array[(i + 1)]) temp = Array[i]; else{ Array[(i + 1)] = Array[i]; temp = Array[i]; } } else if (Array[i] == 0){ for (i = 0; i < setValue; i++){ if (Array[i] > Array[(i + 1)]) temp = Array[(i + 1)]; else if (Array[i] < Array[(i + 1)]) temp = Array[i]; else{ Array[(i + 1)] = Array[i]; temp = Array[i]; } } } else{ for (i = 0; i < setValue; i++){ if (Array[i] > Array[(i + 1)]) temp = Array[(i + 1)]; else if (Array[i] < Array[(i + 1)]) temp = Array[i]; else{ Array[(i + 1)] = Array[i]; temp = Array[i]; } } } } Edited January 12, 2009 by TheJonesy Link to comment Share on other sites More sharing options...
Durka Durka Mahn Posted January 12, 2009 Share Posted January 12, 2009 Oh, ok. And i can see why you hate the class so much. You say it's only a basic course yet you have to make a guitar program using audio and all that! Not even i know how to do audio in Java. And to play multiple files simultaneously you would need to use threads or something which i would assume you have never even heard of. But from your terminology it sounds like you know what you are talking about (or you may just be bullsh*tting it all ) Even though we haven't covered audio at all in the class, he has helped me with it since the project relies heavily on sound. Do I know programming well? It's really for you to decide. As much as I am not happy with my grade, I'm doing fairly good compared to my other classmates. You're very lucky then..my class holds me back mostly, and my teacher is the biggest push over in the world which really sucks. I wish she was a bit more demanding of her students.. So NetBeans allows you to design programs with GUI, correct? May have to get it myself, then.. EDIT: And about your partnered project, I think you actually should use applets because they are a lot easier to use for beginners and have web capability. Yes, NetBeans allows GUI. I don't know specifics, though. We haven't covered GUI much as of now. Unfortunately, I can't use applet. Because we haven't covered audio, we also haven't covered applet either. It isn't exactly what we are working on. We've halted the projects anyway in preparation for mid-terms/exams. I'm finishing up my current homework-project dealing with finding a median. I can't seem to figure out how to put elements of Arrays in ascending order assuming the user doesn't theirself. So far, I have this: Scanner keyboard = new Scanner(System.in); //Sets a list of up to 100 digitsint[] Array = new int[100];int x = 0;int setValue;System.out.println("This program finds the median of a set of values.\nHow many values?");setValue = keyboard.nextInt();System.out.println("Enter the digits:");//Input will continue until setValue has been reachedwhile (x != setValue){ Array[x] = keyboard.nextInt(); x++; }//Various for loops and if-elses to find "temp," which represents the smallest valuefor (int i = 0; i < setValue; i++){ if (Array[i] < 0) for (i = 0; i < setValue; i++){ if (Array[i] > Array[(i + 1)]) temp = Array[(i + 1)]; else if (Array[i] < Array[(i + 1)]) temp = Array[i]; else{ Array[(i + 1)] = Array[i]; temp = Array[i]; } } else if (Array[i] == 0){ for (i = 0; i < setValue; i++){ if (Array[i] > Array[(i + 1)]) temp = Array[(i + 1)]; else if (Array[i] < Array[(i + 1)]) temp = Array[i]; else{ Array[(i + 1)] = Array[i]; temp = Array[i]; } } } else{ for (i = 0; i < setValue; i++){ if (Array[i] > Array[(i + 1)]) temp = Array[(i + 1)]; else if (Array[i] < Array[(i + 1)]) temp = Array[i]; else{ Array[(i + 1)] = Array[i]; temp = Array[i]; } } } } Well, just to let you know, to get any good at programming you'll need to study and work with programming outside of class. You can only learn a tiny percentage of a single language with one class and the only way to become good at programming is to try on your own. The reason I say to use applets is because it is sooo easy to use graphics it isn't even funny. If you want a good Java compiler that compiles Java by itself without all the GUI, you can try JCreator Pro LE (Learning Edition). You can download that here: http://www.jcreator.com/download.htm (Make sure you hit LE, not PRO) And you'll also need the JDK: https://cds.sun.com/is-bin/INTERSHOP.enfini...S-CDS_Developer Link to comment Share on other sites More sharing options...
TheJonesy Posted January 12, 2009 Author Share Posted January 12, 2009 Well, just to let you know, to get any good at programming you'll need to study and work with programming outside of class. You can only learn a tiny percentage of a single language with one class and the only way to become good at programming is to try on your own. The reason I say to use applets is because it is sooo easy to use graphics it isn't even funny. If you want a good Java compiler that compiles Java by itself without all the GUI, you can try JCreator Pro LE (Learning Edition). You can download that here: http://www.jcreator.com/download.htm (Make sure you hit LE, not PRO) And you'll also need the JDK: https://cds.sun.com/is-bin/INTERSHOP.enfini...S-CDS_Developer I see what you mean. I'll look into it. Thank you. Link to comment Share on other sites More sharing options...
Durka Durka Mahn Posted January 12, 2009 Share Posted January 12, 2009 (edited) Here's your basic shell for an applet game, if you want to use it: import java.awt.*;import java.awt.event.*;import java.applet.*;import java.net.*;public class Squarism extends Applet implements Runnable, KeyListener, MouseListener {//These are needed for the update method. DO NOT ERASE.private Image dbImage;private Graphics dbg; //This is the init method. This is ran as soon as the applet is loaded on the webpage. Use this to instantiate objects, assigned values, etc.public void init(){ //Called to make the applet watch for mouse clicks, mouse movement, and key strokes addKeyListener(this); addMouseListener(this);//Starts a new thread for the game to be ran under.Thread th = new Thread (this); th.start ();}public void run(){ //This is where your code will be ran. A while loop is needed to keep it refreshing the screen while(true){ repaint(); //Repaints the screen }}public void paint(Graphics g){ //All your painting goes here.}public void update (Graphics g) //Forces the screen to wait until everything is updated, then it prints the entire image to the main graphics, and when repaint(); is called, you won't have any strange coloring on screen.{ if (dbImage == null) { dbImage = createImage (this.getSize().width, this.getSize().height); dbg = dbImage.getGraphics (); } dbg.setColor (getBackground ()); dbg.fillRect (0, 0, this.getSize().width, this.getSize().height); dbg.setColor (getForeground()); paint (dbg); g.drawImage (dbImage, 0, 0, this);}//These are your mouse functions. I'll leave these here to see as an example.public void mouseClicked(MouseEvent e){ movetox = e.getX(); movetoy = e.getY(); clicked = true;}public void mouseEntered(MouseEvent e){ }public void mouseExited(MouseEvent e){ }public void mousePressed(MouseEvent e){ /*movetox = e.getX(); movetoy = e.getY(); clicked = true;*/}public void mouseReleased(MouseEvent e){ clicked = false;}//These are your key functions. I'll leave the code here for you to see as an example.public void keyPressed(KeyEvent e){ if(e.getKeyCode() == e.VK_LEFT) left = true; if(e.getKeyCode() == e.VK_RIGHT) right = true; if(e.getKeyCode() == e.VK_UP) up=true; if(e.getKeyCode() == e.VK_DOWN) down=true;}public void keyReleased(KeyEvent e){ if(e.getKeyCode() == e.VK_LEFT) left = false; if(e.getKeyCode() == e.VK_RIGHT) right = false; if(e.getKeyCode() == e.VK_UP) up = false; if(e.getKeyCode() == e.VK_DOWN) down = false;}public void keyTyped(KeyEvent e){}} You can read up on these tutorials for making java games with applets. I used them to get started. http://www.javacooperation.gmxhome.de/TutorialStartEng.html Edited January 12, 2009 by Durka Durka Mahn Link to comment Share on other sites More sharing options...
TheJonesy Posted January 13, 2009 Author Share Posted January 13, 2009 I basically finished the project that I had shown the code; I was completely off, but no worries now. But I'll try out applet and such this weekend. I just have some priorities now... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now