- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
hi everyone this is my code. [CODE] public class Qustion3B{ public static void main (String args[]){ double sinx = Math.sin(0.5236); double cosx = Math.cos(0.5236); sinx = Math.pow(0.5236,2); cosx = Math.pow(0.5236,2); double sum=sinx+cosx; System.out.println("sine: " + sinx+"cosine: " + cosx +"sum: " + sum ); } }[/CODE] it continue to show … |
|
I am working on an phone book class, and I have to have the Phone numbers, which have a name and address in an order list(linked). But I have to sort by phone nnumber, not by name...I have been trying to think of ways to sort the phone numbers. So … |
|
Hey a question, In my .sh, I've use a solve command, which solves a problem and output it to the terminal. But I need away to save the output into a txt file, to parse through it.... The solve command output first line is Satisfiable or Unsatisfiable and then the … |
|
Okay I am working on a quick Shortest Job first algorithm and ran into a problem. I can't figure a way to implement, each way I try I get the wrong next process. [CODE]private static int lowTIme(ArrayList<Process> testProcesss, int currTime) { int i; int temp = testProcesss.get(0).getcpuTime(); for(i = 1; … |
|
can anyone tell how to write in core java using command line arguments : a) to print prime numbers from 1 to n b) to calculate the length of input string c) to find whether the number is odd or even d) to convert dollar in rupees e) to accept … |
|
Hey guys, Whenever I load up Eclipse it is really slow when I start type code. This is what happens, I'll load up eclipse, and when I make a new Java Project, it takes about 30 seconds to create it. When I want to start righting code, it freeze on … |
|
I need help writing a pseudo code for converting decimal to binary. this is for Python. I have the program but i am not sure how to write the code please help! thanks! |
|
Hey. I have been trying to do a drafts board, but i am having major problems with adding the pieces. Heres my Board. Any Suggestions?? [code] import java.awt.*; import javax.swing.*; public class Board { protected JPanel[][] squares; protected JFrame boardFrame; protected Container container; public void paint (Graphics g) { } … |
|
Hey. Im having problems adding my Jmenubar to my board. It compiles fine just wont display. Any advice really appreciated. Thanks, Pd [CODE] import java.awt.*; import javax.swing.*; import javax.swing.KeyStroke; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.Font; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JTextField; import … |
|
[CODE]import java.util.Scanner; public class MathTutor { Scanner input = new Scanner(System.in); int numQuestions; int choice; int numCorrect; public MathTutor (){ numQuestions = choice = numCorrect = 0; } public int getNumQuestions(){ { System.out.print("How many questions? "); numQuestions = input.nextInt(); if (numQuestions < 1) { System.out.println("Invalid - must ask at least … |
|
Hey I want to simulate a knight moving in my Knight Tour Gui, this is the display code, the moves are stored in the arraylist moves. [CODE] public void display() { for(int i = 0; i < moves.size(); i++) { //Gets the correct button JButton button = square.get(moves.indexOf(i+1)); button.setText("" + … |
|
This program is supposed to ask the user to input a number and the print will read out the factorial. This code is wrong how do I fix it? Maybe not add much just jumbled up variables? Help! This was given to me created in BLUE J software i know … |
|
I need help with my java program. This program will generate Prime numbers. Class testerPrime will invoke Class Prime. Everything is working but i need my output to print in 10 columns then go to the next line. Here's my code Class Prime [CODE] class Prime { int number; int … |
|
Hey everyone... Well I am sorting items based upon a number. My first case is if tail == null, if so that the first element to be added in the list. My second case is if the element I want to add number is greater than the tail. If so … |
|
I am currently building a Polynomial linked list. Classes [B]Node[/B], that has a Term and a Node next. [url]http://www.boomica.com/Node.java[/url] [B]Term[/B] with a coefficient and exponent. [url]http://www.boomica.com/Term.java[/url] [B]Polynomial[/B] [url]http://www.boomica.com/Polynomial.java[/url] [CODE]public void addTerm(Term nomial) { Node temp = first; Node toAdd; if(isEmpty() || (temp.getTerm().compareTo(nomial) <= 0)) { Node newFirst = new Node(nomial, … |
|
Hi there, I'm attempting to write a program that does the target word puzzles you see in most major newspapers. The target word problem involves a 3x3 grid of 9 random letters that a user needs to be able to make words out of using at least the middle letter … |
|
this is my first program using more than one method. while i like it because of its modularity and cleanness, i despise it for its multiple new problems it introduces into my world where i was just getting the hang of the old style. i am supposed to be doing … |
|
Guys.. I am trying to figure out Comparator so I can compare Strings in an object array (the object has other data types as well). I have been hunting around and have come up with this.. but I cant get it to work --> Can anyone point me in the … |
|
I am trying to get this program to count the number of characters in a string. By number of characters l mean not punctuation or a space.What is wrong with my code because l don't understand why the program won't work? [CODE]import javax.swing.*; publiemc class ExamPractise { public static void … |
|
I need to create a scientific calculator using applet in neat beans 6.1 but i cant do it. if there someone who did it before, can you help me about my problem.its for our project in our school. asking a help.Thanks a lot. |
|
Hey Guys, I am working on a BlackJack GUI, I have just about everything set up, and now I am working on generating the cards. I was doing some quick snippet test, to see if I can get it working. But no luck, I wanted to know if I can … |
|
hii frndz...i want to make a all in one key generator wid d help of java....plz help....... |
|
I have the log file blackjacksample.txt $10000 3 [2H, 4C, KC, 5D] $10 [QS, QD] $5 [AC, 3C, 4D] $25 [10H, 5C, 7H] [7C, 5C, 10H] $20 [JH, 3C, 8H] $15 [3H, 6D, JC] $5 [AH, KH] [9C, JS] $40 [5C, 7H, 3D, KS] $30 [9C, 10D] $50 [AD, 10C] … |
|
You guys know of a good Java Ide? I have tried Netbeans and Eclipse but its slow. Loading the programs up takes about 5-7 minutes, and when I type. It freezes and 15-25 seconds later it show it on the screen. I need something better....Any ideas? |
|
Hi, I'm trying to add windowClosing into my program, so that when ran, I can exit by clicking on the X(top right corner). The bold is what i added to try making the windowClosing work. I keep getting errors though. Anyone know what I can do to fix this? errors: … |
|
I am new on the board found the site while I was searching for some MIPS article/help on google. |
|
I cant check if this is write as I have to do it at school. But I wanted to know if you can read over for me. This is my multiplication [CODE] add $s2, $zero, $zero add $t0, $zero, $zero LOOP: beq $t0, $s0, EXIT add $s2, $s1, $s2 addi … |