Expand|Select|Wrap|Line Numbers
- 4
- Katea
- Murray
- 3.75
- 9
- Matt
- Reese
- 2.89
- 11
- Liz
- Huntley
- 3.98
- 12
- Ken
- Black
- 2.99
- 11
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
- public void menu()
- {
- char ch=30;
- char ch1=31;
- int l;
- for(int i=0;i<27;i++)
- {
- System.out.print(" ");
- }
- for(l=0;l<2;l++)
- {
- for(int j=0;j<38;j++)
- {
- System.out.print(ch);
- }
- System.out.println("");
- for(int k=0;k<27;k++)
- {
- System.out.print(" ");
- }
- }
- System.out.print(ch);
- System.out.print(ch1);
- for(int i=0;i<34;i++)
- System.out.print(" ");
- System.out.print(ch);
- System.out.print(ch1);
- System.out.println("");
- for(int i=0;i<27;i++)
- System.out.print(" ");
- System.out.print(ch);
- System.out.print(ch1+" ");
- System.out.print (" 1. Enter new Students record ");
- System.out.print(" "+ch);
- System.out.println(ch1+" ");
- for(int i=0;i<26;i++)
- System.out.print(" ");
- System.out.print(" "+ch1);
- System.out.print(ch+" ");
- System.out.print (" 2. Display All Student records and GPA: ");
- System.out.print(" "+ch);
- System.out.println(ch1+" ");
- for(int i=0;i<26;i++)
- System.out.print(" ");
- System.out.print(" "+ch);
- System.out.print(ch1+" ");
- System.out.print (" 3. Search students by first name: ");
- System.out.print(" "+ch);
- System.out.println(ch1+" ");
- for(int i=0;i<26;i++)
- System.out.print(" ");
- System.out.print(" "+ch);
- System.out.print(ch1+" ");
- System.out.print (" 4. Search students by last name: ");
- System.out.print(" "+ch);
- System.out.println(ch1+" ");
- for(int i=0;i<26;i++)
- System.out.print(" ");
- System.out.print(" "+ch);
- System.out.print(ch1+" ");
- System.out.print (" 5. Search searchstudents by GPA:");
- System.out.print(" "+ch);
- System.out.println(ch1+" ");
- for(int i=0;i<26;i++)
- System.out.print(" ");
- System.out.print(" "+ch);
- System.out.print(ch1+" ");
- System.out .print(" 6. Replace Student Record: ");
- System.out.print(" "+ch);
- System.out.println(ch1+" ");
- for(int i=0;i<26;i++)
- System.out.print(" ");
- System.out.print(" "+ch);
- System.out.print(ch1+" ");
- System.out .print(" 7. Delete Record: ");
- System.out.print(" "+ch);
- System.out.println(ch1+" ");
- for(int i=0;i<26;i++)
- System.out.print(" ");
- System.out.print(" "+ch);
- System.out.print(ch1+" ");
- System.out .print(" 8. Exit: ");
- System.out.print(" "+ch);
- System.out.println(ch1+" ");
- for(int j=0;j<27;j++)
- System.out.print(" ");
- System.out.print(ch);
- System.out.print(ch1);
- for(int i=0;i<34;i++)
- System.out.print(" ");
- System.out.print(ch);
- System.out.print(ch1);
- System.out.println("");
- for(int i=0;i<27;i++)
- System.out.print(" ");
- for(int i=0;i<38;i++)
- System.out.print(ch);
- System.out.println("");
- for(int i=0;i<27;i++)
- System.out.print(" ");
- for(int i=0;i<38;i++)
- System.out.print(ch);
- //Scanner input = new Scanner ( System.in);
- //int s;
- int choice=0;
- String strChoice = JOptionPane.showInputDialog(null,"Pick your action");
- choice = Integer.parseInt(strChoice);
- //s=new input.nextInt();
- // SimpleComparator(int s) {
- switch (choice) {
- case 1:
- new_student();
- break;
- case 2:
- display_allstudents();
- dispay_gpa_average
- break;
- case 3:
- search_by_first_name();
- break;
- case 4:
- search_by_last_name();
- break;
- case 5:
- search_by_gpa();
- break;
- case 6:
- replace_record();
- break;
- case 7:
- delete_record();
- break;
- case 8:
- break;
- default:
- break;
- //}
- //}
- }
- }