sorting student records


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: sorting student records

  1. #1
    Join Date
    Jan 2006
    Posts
    10

    Question sorting student records

    Could someone give me some pointers on how to start this porgram? Thanks in advance!

    Write a program that retrieves the "Lab17a.dat" text file. This is the same text file that you used for the Lab17a assignment with the same student record format. For this assignment you will not only retrieve a text file, but also create a new text file. This means that in addition to using the FileReader class and the BufferedReader class, you will also need to use the FileWriter class and the BufferedWriter class of the java.io.* package.

    Retrieve the "Lab17a.dat" file and check the gpa of each student record. A new file, called "Lab17b.dat", is created with all student records purged that have gpas below 2.0. As you execute the program you need to display the record of each student that will be purged, along with a count of the total records purged.

    First output:
    Name: Ann Seaborn
    GPA: 1.785

    Name: Mary Pridgen
    GPA: 1.957

    Name: Steven Johnson
    GPA: 0.785

    Name: Tom Tooch
    GPA: 1.456

    Name: Mike Bruun
    GPA: 1.783


    Total records purged: 5

    Second output
    Bart Reagor
    27
    2.075
    Kristyn Reckner
    19
    3.225
    Paul Reiman
    41
    4.000
    Andy Reitinger
    20
    3.525
    William Reynolds
    50
    3.375
    William Robbins
    34
    2.875
    Brian Roberts
    23
    3.175
    Lauri Robertson
    19
    2.925
    Richardson Robinson
    26
    3.210
    Laurie Rosemberg
    45
    4.000
    Barbara Salsa
    18
    3.000
    Lori Salbury
    23
    3.455
    Diane Simcox
    32
    2.175
    Kevin Sims
    67
    3.235
    Michael Ward
    19
    3.451
    Cheryl willis
    37
    3.576
    Tracy Springer
    41
    2.305
    Nancy Barone
    25
    2.975
    Patti Skinner
    47
    2.743
    Diana Rockel
    56
    3.456
    Michelle Ritter
    25
    4.000
    Mali Cozart
    16
    2.345
    Todd Deans
    22
    2.023
    Laura Collins
    30
    3.999
    Debbie Mozart
    40
    2.999
    Gordon Collins
    25
    3.100
    Susan Craft
    29
    3.754
    Vance Brawner
    31
    3.678

    Thanks again!
    Absit invidia

  2. #2
    Join Date
    Dec 2005
    Posts
    97
    could you possibly attach the .dat files so i may look at them and also so i can have some data to test the program with?

    also, what exactly do you need help with? show some effort so i know where you are.
    Last edited by anubis; 02-01-2006 at 01:05 AM.

Similar Threads

  1. StudentList Class
    By WillisTi in forum Java
    Replies: 2
    Last Post: 02-25-2005, 07:35 AM
  2. Replies: 0
    Last Post: 07-19-2002, 02:41 AM
  3. saving records in Access
    By Hian Chew in forum VB Classic
    Replies: 1
    Last Post: 03-28-2001, 01:45 PM
  4. JAVA help
    By Munchkin in forum Java
    Replies: 3
    Last Post: 03-16-2001, 05:58 PM
  5. sorting records
    By mike in forum VB Classic
    Replies: 1
    Last Post: 04-21-2000, 02:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center