Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Posts
    1

    Unanswered: 1 dimentional arrays

    Hi all

    Im trying to write a program to use 1 dimentional arrays to access a txt file and display it, alter it and add to it and delete from it .

    Basically the txt file is a file with names and telephone numbers in

    Heres my brief:

    txt file

    Anne 3478
    Joe 3452
    John 2270
    Jill 6752
    ****
    i.e. a name and a telephone number both represented by strings. The end of the file is indicated by the sentinel “****”.

    Your solution must use a 1 dimensional array to hold the person’s name and another 1 dimensional array to store the telephone numbers. Assume the file will have a maximum number of 20 names and their associated telephone numbers.

    The first action performed is to open the file and read the data into the arrays. Entry of the names and telephone numbers should be performed using a Read-Ahead construct based on a while construct. Once the data has been read from the file, the menu is displayed and depending on the user’s choice appropriate actions are taken until the user quits the system.


    Now i dont really know how to use arrays as they are new to me. How do i do this please?

  2. #2
    Join Date
    Jan 2005
    Posts
    362

    Sun.com

    Please, read the tutorial of sun: http://java.sun.com/docs/books/tutor...ta/arrays.html
    and if you want more try something like arrays,java,free tutorials in google.
    dimis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •