User Profile

Collapse

Profile Sidebar

Collapse
TexasNewbie
TexasNewbie
Last Activity: Feb 2 '07, 07:06 PM
Joined: Dec 8 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • TexasNewbie
    replied to Tough assignment
    in Java
    after some munipulation I have an error on line 33 that states array diminsion missing

    line 33 print(list, length.getNum(1 2));

    Any clues
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    replied to Tough assignment
    in Java
    This is the code that I came up with using what I got out of the instruction. It will not compile and honestly I have tried to change it every which way I can. I have looked at all your responses and have tried to impliment them into the program with no success. I just can't get it to compile


    import java.io.*;

    import java.util.*;

    public class Assignment5
    {
    static BufferedReader...
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    replied to Tough assignment
    in Java
    okay, so far I am with you. he also put in here that I can assume that the array is unsorted. which I am assuming is that the integers are not in recognizable order and that they are random. So I guess that what needs to be created first is the three parameters, is that correct?
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    started a topic Tough assignment
    in Java

    Tough assignment

    I have to write a method , RemoveAll that takes three parameters: an array of integers the length of an array and an integer. Say RemoveItem. The method should find and delete all occurences of removeItem in the array.

    I have told the instructor that I am not sure exactly what he wants me to do and I have looked at all the instances of removeItems in the script and still I am clueless.

    Can someone explain what I should...
    See more | Go to post

  • TexasNewbie
    replied to Applet question
    in Java
    Never mind I have got it figured out.
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    started a topic Applet question
    in Java

    Applet question

    this is an applet for a white board with an append button on it, when you press it what ever you have typed in one box should show up in the second box, but it doesn't. Have the program doing everything but that.


    import javax.swing.*;
    import java.awt.*;
    import java.awt.event. *;

    public class WhiteBoard extends JApplet //start of applet
    {
    private static int WIDTH = 550;
    ...
    See more | Go to post

  • TexasNewbie
    replied to Calculator without a decimal point
    in Java
    On the actual code that I have on my system it is all indented, but when I copied it over this is what happened. Again thanks for your help.
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    replied to Calculator without a decimal point
    in Java
    Final code:

    Code:
    /**
    *  Description: This takes the original calculator program that could be used 
    *  on integers and converts it to be able to use decimal numbers. Division by 
    *  zero creates error resulting in ERROR: / by zero.
    */
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    
    public class Calculator extends JFrame implements
    ...
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    replied to Calculator without a decimal point
    in Java
    I would like to thank everyone for thier input and let you know that I have resolved all issues with this project. New one to come soon. Expect to hear more from me. Thanks again.
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    replied to Calculator without a decimal point
    in Java
    private String evaluate()
    {
    final char beep = '\u0007';

    try
    {
    double num1 = Double.parseDou ble(numStr1);
    double num2 = Double.parseDou ble(numStr2);
    double result = 0;

    switch (op)
    {
    case '+': result = num1 + num2;
    break;
    ...
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    replied to Calculator without a decimal point
    in Java
    Okay, I put the statement were thought it should go but it still comes up infinity, any other hints clues suggestions? Or am I just an idiot? See below


    import javax.swing.*;
    import java.awt.*;
    import java.awt.event. *;
    import java.io.*;

    public class Calculator extends JFrame implements ActionListener {
    private JTextField displayText = new JTextField(30);
    private JButton[]...
    See more | Go to post
    Last edited by TexasNewbie; Jan 25 '07, 06:11 PM. Reason: forgot some info

    Leave a comment:


  • TexasNewbie
    replied to Calculator without a decimal point
    in Java
    Now I'm really confused as to were I would insert the Dividing by (int) 0 or were I would put the throw exception to make this happen? I have tried install it in several places in the code and all I get is error after error. I'm really lost here!...
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    replied to Calculator without a decimal point
    in Java
    further problem now I am getting infinity if I divide by zero. The exception should have caught it and given it an error : / by zero. Now, what have I forgotten?
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    replied to Calculator without a decimal point
    in Java
    I cant believe that it was something that I overlooked. A special thanks to r035198x, for not only looking over the code, but for helping me out.
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    started a topic Calculator without a decimal point
    in Java

    Calculator without a decimal point

    This was originally just a calculator without a decimal point. After I added the decimal, it now tells me invalid second number.


    Code:
    //GUI Calculator Program
    
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    
    public class Calculator extends JFrame implements ActionListener
    {
        private JTextField displayText = new JTextField(30);
    ...
    See more | Go to post
    Last edited by r035198x; Jan 23 '07, 05:56 AM. Reason: OP forgot to put code tags

  • TexasNewbie
    replied to Gui problem
    in Java
    Got it figured out thanks for the help....
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    replied to Gui problem
    in Java
    Either, The over all outcome should be that the lowercase letter covert to upper case....
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    replied to Tell me what I am missing here.
    in Java
    I got it thanks to those that responded.
    See more | Go to post

    Leave a comment:


  • TexasNewbie
    started a topic Gui problem
    in Java

    Gui problem

    Okay I thought I had this figured out....it gives the gui...but then on the coversion to capitol letters it gives me all kinds of exceptions

    import javax.swing.JOp tionPane; //GUI support


    public class UpperCase
    {

    public static void main(String[] args)
    {
    String s;

    s = JOptionPane.sho wInputDialog("E nter any characters:");
    ...
    See more | Go to post

  • TexasNewbie
    replied to Tell me what I am missing here.
    in Java
    I took it out and java still hangs up. the program just keeps running. Is there something else to look at?...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...