Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

uploaded is a site with my problem please help asap

Posted on 2003-03-11
8
Medium Priority
?
183 Views
Last Modified: 2010-03-31
http://www.cashquest.biz/javahelp.html

please see question and contact info on this site.
0
Comment
Question by:earthnotes
8 Comments
 
LVL 2

Expert Comment

by:karlika
ID: 8114785
I would really like to help you, but the code you posted has very few in common with java-code (or it's just VERY incomplete).
It would help if you would post some actual Exception you get.

Marko
0
 
LVL 35

Expert Comment

by:TimYates
ID: 8115468
-----------------------------------------------------------
Contacting you about this question in any way but via this question is against EE user policy, and you are in violation by asking...

Also, you should post your question and any code you have here, NOT on a supplimentary website (unless it is a demonstration of how an applet fails, etc...
-----------------------------------------------------------

Please post your question, and code
0
 

Author Comment

by:earthnotes
ID: 8122144
My problems are as follows

cannot resolve symbol


location: class java.util.ArrayList

the reason this code looks incomplete is because it is to be run by a driver program which I have not been able to use yet. Please help or post a question regarding this proble,

Thank you

http://www.cashquest.biz/javahelp.html
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Accepted Solution

by:
TimYates earned 200 total points
ID: 8123060
QUESTION: (Which you are SUPPOSED to post HERE, not on another site)
------------------------------------------------------
someone please tell me why java won't recognize the mathods I am trying to use in the ArrayList class in the java.util package. I am going to run it with a driver when it runs.

Thank you,
Mike AIM: earth notes int
e-mail: earthnotes@mail.com

import java.util.ArrayList;

public class ArrayManip
{
 private int count, addInt, sum=0;
 private int position, length;
 private String name, pin;

 public ArrayManip()
 {
   System.out.println("What is your name?: ");
   name = Keyboard.readString();
   System.out.println("What is the pin for this set?: ");
   pin = Keyboard.readString();
 }
 //*********************************************************************

 public int inputInts()
 {
   ArrayList manip = new ArrayList();
   System.out.println("How many numbers in this set?: ");
   length = Keyboard.readInt();
   for(int i=0; i < length; i++)
   {
     System.out.println("Enter an Integer: ");
     addInt = Keyboard.readInt();
     manip.add (addInt);
     sum += addInt;
     count++;
   }
   System.out.println();
   System.out.println("Size of set: " + length);
 }

 //*********************************************************************

  public int deleteInt()
  {
    System.out.println("Remove which number?: ");
    int number = Keyboard.readInt();
    int deleteNumber = manip.indexOf (number);
    System.out.println();
    manip.remove (deleteNumber);
    sum -= manip.indexOf (number);
    System.out.println("Size of set: " + length);
  }

  public int displayInts()
  {
    System.out.println("Name: " + name);
    System.out.println();
    System.out.println("PIN: " + pin);
    System.out.println();
    for (int index=0; index < length; index++)
      System.out.println(((index)+1) + ": " + manip.get(index));
  }

  public int keepTotal()
  {
    System.out.println("sum: " + sum);
    System.out.println();
  }
}
 
0
 
LVL 35

Expert Comment

by:TimYates
ID: 8123103
ANSWER:

You need to declare "manip" as a member variable of this class, you also cannot put "int" variables into an ArrayList, as they do not subclass Object, you must wrapper them in an Integer:

I assume Keyboard.readInt() returns an "int"
------------------------------------------------------

import java.util.ArrayList;

public class ArrayManip
{
private int count, addInt, sum=0;
private int position, length;
private String name, pin;
private ArrayList manip ;

public ArrayManip()
{
  System.out.println("What is your name?: ");
  name = Keyboard.readString();
  System.out.println("What is the pin for this set?: ");
  pin = Keyboard.readString();
}
//*********************************************************************

public int inputInts()
{
  manip = new ArrayList();

  System.out.println("How many numbers in this set?: ");
  length = Keyboard.readInt();
  for( int i = 0 ; i < length ; i++ )
  {
    System.out.println("Enter an Integer: ");
    addInt = Keyboard.readInt();
    manip.add( new Integer( addInt ) ) ;
    sum += addInt;
    count++;
  }
  System.out.println();
  System.out.println("Size of set: " + length);
}

//*********************************************************************

 public int deleteInt()
 {
   System.out.println("Remove which number?: ");
   int number = Keyboard.readInt();
   int deleteNumber = manip.indexOf( new Integer( number ) );
   if( deleteNumber > -1 )
   {
     System.out.println();
     manip.remove( deleteNumber ) ;
     sum -= number ;
     length-- ;
     System.out.println( "Size of set: " + length);
   }
 }

 public int displayInts()
 {
   System.out.println("Name: " + name);
   System.out.println();
   System.out.println("PIN: " + pin);
   System.out.println();
   for (int index=0; index < length; index++)
     System.out.println(((index)+1) + ": " + manip.get(index));
 }

 public int keepTotal()
 {
   System.out.println("sum: " + sum);
   System.out.println();
 }
}
0
 
LVL 35

Expert Comment

by:TimYates
ID: 8127076
Hello?

I'm not emailing you...

I'm a good boy, who plays within the rules ;-)
0
 

Expert Comment

by:CleanupPing
ID: 9058768
earthnotes:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 35

Expert Comment

by:girionis
ID: 9700691
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points to TimYates

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

girionis
EE Cleanup Volunteer
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Don’ts and Dos are two important end products of software testing basics that a tester needs to regard. This article attempts to explain the principles of both.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question