473,498 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Please Help due in 45 min

1 New Member
I need to write a program that reads this from the text file

Expand|Select|Wrap|Line Numbers
  1. 4
  2. Katea
  3. Murray
  4. 3.75
  5. 9
  6. Matt
  7. Reese
  8. 2.89
  9. 11
  10. Liz
  11. Huntley
  12. 3.98
  13. 12
  14. Ken
  15. Black
  16. 2.99
  17. 11
and puts it in a few arrays
grade
FirstName
LastName
Gpa

the program also needs a capability to search those arrays
// Search by first name
// Search by last name
// Search by Gpa

and to provide an overall Gpa average
and it needs to have a capabilty to add new students
please help

I already have the menu
Expand|Select|Wrap|Line Numbers
  1. public void menu()
  2.                {
  3.             char ch=30;
  4.                 char ch1=31;
  5.                 int l;
  6.                 for(int i=0;i<27;i++)
  7.                 {
  8.                   System.out.print(" ");
  9.                 }
  10.                 for(l=0;l<2;l++)
  11.                {
  12.  
  13.                 for(int j=0;j<38;j++)
  14.                 {
  15.  
  16.                   System.out.print(ch);
  17.                 }
  18.                   System.out.println("");
  19.                    for(int k=0;k<27;k++)
  20.                 {
  21.                   System.out.print(" ");
  22.                 }
  23.               }
  24.                 System.out.print(ch);
  25.                 System.out.print(ch1);
  26.                 for(int i=0;i<34;i++)
  27.                 System.out.print(" ");
  28.                 System.out.print(ch);
  29.                 System.out.print(ch1);
  30.                 System.out.println("");
  31.                 for(int i=0;i<27;i++)
  32.                 System.out.print(" ");
  33.  
  34.                 System.out.print(ch);
  35.                 System.out.print(ch1+" ");
  36.                 System.out.print (" 1. Enter new Students record           ");
  37.  
  38.                 System.out.print(" "+ch);
  39.                 System.out.println(ch1+" ");
  40.  
  41.                 for(int i=0;i<26;i++)
  42.                 System.out.print(" ");
  43.                 System.out.print(" "+ch1);
  44.                 System.out.print(ch+" ");
  45.  
  46.  
  47.             System.out.print (" 2. Display All Student records and GPA:         ");
  48.                 System.out.print(" "+ch);
  49.                 System.out.println(ch1+" ");
  50.  
  51.  
  52.                 for(int i=0;i<26;i++)
  53.                 System.out.print(" ");
  54.                 System.out.print(" "+ch);
  55.                 System.out.print(ch1+" ");
  56.  
  57.  
  58.             System.out.print (" 3. Search students by first name:      ");
  59.                 System.out.print(" "+ch);
  60.                 System.out.println(ch1+" ");
  61.  
  62.  
  63.                 for(int i=0;i<26;i++)
  64.                 System.out.print(" ");
  65.                 System.out.print(" "+ch);
  66.                 System.out.print(ch1+" ");
  67.  
  68.             System.out.print (" 4. Search students by last name:      ");
  69.                 System.out.print(" "+ch);
  70.                 System.out.println(ch1+" ");
  71.  
  72.  
  73.                 for(int i=0;i<26;i++)
  74.                 System.out.print(" ");
  75.                 System.out.print(" "+ch);
  76.                 System.out.print(ch1+" ");
  77.  
  78.  
  79.             System.out.print (" 5. Search searchstudents by GPA:");
  80.                 System.out.print(" "+ch);
  81.                 System.out.println(ch1+" ");
  82.  
  83.  
  84.                 for(int i=0;i<26;i++)
  85.                 System.out.print(" ");
  86.                 System.out.print(" "+ch);
  87.                 System.out.print(ch1+" ");
  88.  
  89.  
  90.                 System.out .print(" 6. Replace Student Record:             ");
  91.                 System.out.print(" "+ch);
  92.                 System.out.println(ch1+" ");
  93.  
  94.  
  95.                 for(int i=0;i<26;i++)
  96.                 System.out.print(" ");
  97.                 System.out.print(" "+ch);
  98.                 System.out.print(ch1+" ");
  99.  
  100.  
  101.             System.out .print(" 7. Delete Record:              ");
  102.                 System.out.print(" "+ch);
  103.                 System.out.println(ch1+" ");
  104.  
  105.  
  106.                 for(int i=0;i<26;i++)
  107.                 System.out.print(" ");
  108.                 System.out.print(" "+ch);
  109.                 System.out.print(ch1+" ");
  110.  
  111.  
  112.             System.out .print(" 8. Exit:                       ");
  113.                 System.out.print(" "+ch);
  114.                 System.out.println(ch1+" ");
  115.  
  116.  
  117.                 for(int j=0;j<27;j++)
  118.                 System.out.print(" ");
  119.                 System.out.print(ch);
  120.                 System.out.print(ch1);
  121.                 for(int i=0;i<34;i++)
  122.                 System.out.print(" ");
  123.                 System.out.print(ch);
  124.                 System.out.print(ch1);
  125.                 System.out.println("");
  126.                 for(int i=0;i<27;i++)
  127.                 System.out.print(" ");
  128.                 for(int i=0;i<38;i++)
  129.                 System.out.print(ch);
  130.                 System.out.println("");
  131.                 for(int i=0;i<27;i++)
  132.                 System.out.print(" ");
  133.                 for(int i=0;i<38;i++)
  134.                 System.out.print(ch);
  135.                 //Scanner input = new Scanner ( System.in);
  136.                  //int s;
  137.  
  138.                 int choice=0;
  139.                 String strChoice = JOptionPane.showInputDialog(null,"Pick your action");
  140.                 choice = Integer.parseInt(strChoice);
  141.                  //s=new input.nextInt();
  142.  
  143.                // SimpleComparator(int s) {
  144.                 switch (choice) {
  145.                         case 1:
  146.                         new_student();
  147.  
  148.                         break;
  149.                         case 2:
  150.                         display_allstudents();
  151.                                                                         dispay_gpa_average
  152.  
  153.                         break;
  154.                         case 3:
  155.                         search_by_first_name();
  156.  
  157.                         break;
  158.                         case 4:
  159.                         search_by_last_name();
  160.  
  161.                         break;
  162.                         case 5: 
  163.                        search_by_gpa();           
  164.                         break;
  165.                         case 6:
  166.                         replace_record();
  167.  
  168.                         break;
  169.                         case 7:
  170.                         delete_record();
  171.  
  172.                         break;
  173.                         case 8:
  174.  
  175.                         break;
  176.                          default:
  177.  
  178.                         break;
  179.                     //}
  180.                 //}
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.         }
  192.  
  193.            }
Feb 19 '08 #1
2 1161
Ganon11
3,652 Recognized Expert Specialist
This isn't a chat room, so you can't possibly expect an answer within 45 minutes. Also, we don't give out full solutions, we merely guide you to solving your own problems. We'd love to go through any specific issues you have if you can show us what you're attempted in order to solve them.

Additionally, please don't post two threads on one topic. It doesn't get you an answer any faster - if anything, it slows the response down, because people don't know what has been posted in the second topic, and they might repeat information. So basically keep it to one thread per topic.
Feb 19 '08 #2
nomad
664 Recognized Expert Contributor
I need to write a program that reads this from the text file
I don't think you're going to make it...
anyway read up on FileReader class.

nomad
Feb 19 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2148
by: Numberwhun | last post by:
Hello everyone! I am trying to learn java and have run into kind of a snag. Here is the code that I have so far: ------ <begin_code> ---------- import javax.swing.*; import...
1
1963
by: HolaGoogle | last post by:
Hi all, Please help me with the following..it's realy urgent and i tried everything i could and i can't get it work properly!! Thanks in advance. Here's what i'm trying to accomplish: in my...
0
1960
by: s_erez | last post by:
Hi, This is a realy tricky one. I have an ASP.NET application where some pages are reading data from a DB and presenting reports. In order for the user to wait while the page is reading data from...
2
2339
by: rked | last post by:
I get nameSPAN1 is undefined when I place cursor in comments box.. <%@ LANGUAGE="VBScript" %> <% DIM ipAddress ipAddress=Request.Servervariables("REMOTE_HOST") %> <html> <head> <meta...
7
3569
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
4
3503
by: pshindle | last post by:
DB2 Team - I just downloaded and unzipped the new Fixpack 9 for DB2 ESE V8 for Windows (FP9_WR21350_ESE.exe). I then burned the unzipped Fixpack files to a CD. I proceded to install this...
23
3231
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
1
54448
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and...
4
2318
by: fatboySudsy | last post by:
Hi, I have constructed a client program that has given me some error codes that i just cannot see. I was wondering if a different set of eyes with much more experience than me could help me out. ...
0
7168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7210
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6891
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5465
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4595
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
659
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
293
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.